Masterarbeit Richard Stern. Flutter App, sich mit einem Bluetooth-Gerät verbindet und Berührungen auf einem Sensor visualisiert.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

build.html 8.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7. <meta name="description" content="API docs for the build method from the CharacteristicTile class, for the Dart programming language.">
  8. <title>build method - CharacteristicTile class - widgets library - Dart API</title>
  9. <!-- required because all the links are pseudo-absolute -->
  10. <base href="../..">
  11. <link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500,400i,400,300|Source+Sans+Pro:400,300,700" rel="stylesheet">
  12. <link rel="stylesheet" href="static-assets/github.css">
  13. <link rel="stylesheet" href="static-assets/styles.css">
  14. <link rel="icon" href="static-assets/favicon.png">
  15. </head>
  16. <body>
  17. <div id="overlay-under-drawer"></div>
  18. <header id="title">
  19. <button id="sidenav-left-toggle" type="button">&nbsp;</button>
  20. <ol class="breadcrumbs gt-separated dark hidden-xs">
  21. <li><a href="index.html">touch_demonstrator</a></li>
  22. <li><a href="widgets/widgets-library.html">widgets</a></li>
  23. <li><a href="widgets/CharacteristicTile-class.html">CharacteristicTile</a></li>
  24. <li class="self-crumb">build method</li>
  25. </ol>
  26. <div class="self-name">build</div>
  27. <form class="search navbar-right" role="search">
  28. <input type="text" id="search-box" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
  29. </form>
  30. </header>
  31. <main>
  32. <div class="col-xs-6 col-sm-3 col-md-2 sidebar sidebar-offcanvas-left">
  33. <h5>CharacteristicTile class</h5>
  34. <ol>
  35. <li class="section-title"><a href="widgets/CharacteristicTile-class.html#constructors">Constructors</a></li>
  36. <li><a href="widgets/CharacteristicTile/CharacteristicTile.html">CharacteristicTile</a></li>
  37. <li class="section-title">
  38. <a href="widgets/CharacteristicTile-class.html#instance-properties">Properties</a>
  39. </li>
  40. <li><a href="widgets/CharacteristicTile/characteristic.html">characteristic</a></li>
  41. <li><a href="widgets/CharacteristicTile/descriptorTiles.html">descriptorTiles</a></li>
  42. <li><a href="widgets/CharacteristicTile/onlyCharacteristicToListen.html">onlyCharacteristicToListen</a></li>
  43. <li><a href="widgets/CharacteristicTile/onNotificationPressed.html">onNotificationPressed</a></li>
  44. <li class="inherited"><a href="widgets/CharacteristicTile/hashCode.html">hashCode</a></li>
  45. <li class="inherited"><a href="widgets/CharacteristicTile/key.html">key</a></li>
  46. <li class="inherited"><a href="widgets/CharacteristicTile/runtimeType.html">runtimeType</a></li>
  47. <li class="section-title"><a href="widgets/CharacteristicTile-class.html#instance-methods">Methods</a></li>
  48. <li><a href="widgets/CharacteristicTile/build.html">build</a></li>
  49. <li class="inherited"><a href="widgets/CharacteristicTile/createElement.html">createElement</a></li>
  50. <li class="inherited"><a href="widgets/CharacteristicTile/debugDescribeChildren.html">debugDescribeChildren</a></li>
  51. <li class="inherited"><a href="widgets/CharacteristicTile/debugFillProperties.html">debugFillProperties</a></li>
  52. <li class="inherited"><a href="widgets/CharacteristicTile/noSuchMethod.html">noSuchMethod</a></li>
  53. <li class="inherited"><a href="widgets/CharacteristicTile/toDiagnosticsNode.html">toDiagnosticsNode</a></li>
  54. <li class="inherited"><a href="widgets/CharacteristicTile/toString.html">toString</a></li>
  55. <li class="inherited"><a href="widgets/CharacteristicTile/toStringDeep.html">toStringDeep</a></li>
  56. <li class="inherited"><a href="widgets/CharacteristicTile/toStringShallow.html">toStringShallow</a></li>
  57. <li class="inherited"><a href="widgets/CharacteristicTile/toStringShort.html">toStringShort</a></li>
  58. <li class="section-title inherited"><a href="widgets/CharacteristicTile-class.html#operators">Operators</a></li>
  59. <li class="inherited"><a href="widgets/CharacteristicTile/operator_equals.html">operator ==</a></li>
  60. </ol>
  61. </div><!--/.sidebar-offcanvas-->
  62. <div class="col-xs-12 col-sm-9 col-md-8 main-content">
  63. <h1>build method</h1>
  64. <section class="multi-line-signature">
  65. <div>
  66. <ol class="annotation-list">
  67. <li>@override</li>
  68. </ol>
  69. </div>
  70. <span class="returntype">Widget</span>
  71. <span class="name ">build</span>
  72. (<wbr><span class="parameter" id="build-param-context"><span class="type-annotation">BuildContext</span> <span class="parameter-name">context</span></span>)
  73. </section>
  74. <section class="desc markdown">
  75. <p>Describes the part of the user interface represented by this widget.</p>
  76. <p>The framework calls this method when this widget is inserted into the
  77. tree in a given <code>BuildContext</code> and when the dependencies of this widget
  78. change (e.g., an <code>InheritedWidget</code> referenced by this widget changes).</p>
  79. <p>The framework replaces the subtree below this widget with the widget
  80. returned by this method, either by updating the existing subtree or by
  81. removing the subtree and inflating a new subtree, depending on whether the
  82. widget returned by this method can update the root of the existing
  83. subtree, as determined by calling <code>Widget.canUpdate</code>.</p>
  84. <p>Typically implementations return a newly created constellation of widgets
  85. that are configured with information from this widget's constructor and
  86. from the given <code>BuildContext</code>.</p>
  87. <p>The given <code>BuildContext</code> contains information about the location in the
  88. tree at which this widget is being built. For example, the context
  89. provides the set of inherited widgets for this location in the tree. A
  90. given widget might be built with multiple different <code>BuildContext</code>
  91. arguments over time if the widget is moved around the tree or if the
  92. widget is inserted into the tree in multiple places at once.</p>
  93. <p>The implementation of this method must only depend on:</p><ul><li>the fields of the widget, which themselves must not change over time,
  94. and</li><li>any ambient state obtained from the <code>context</code> using
  95. <code>BuildContext.inheritFromWidgetOfExactType</code>.</li></ul>
  96. <p>If a widget's <a href="widgets/CharacteristicTile/build.html">build</a> method is to depend on anything else, use a
  97. <code>StatefulWidget</code> instead.</p>
  98. <p>See also:</p><ul><li>The discussion on performance considerations at <code>StatelessWidget</code>.</li></ul>
  99. </section>
  100. <section class="summary source-code" id="source">
  101. <h2><span>Implementation</span> </h2>
  102. <pre class="language-dart"><code class="language-dart">@override
  103. Widget build(BuildContext context) {
  104. if(onlyCharacteristicToListen == characteristic.uuid.toString().toUpperCase().substring(4,8)){
  105. print(&quot;found ${characteristic.uuid.toString().toUpperCase().substring(4,8)} &#47;&#47;&#47; $onlyCharacteristicToListen&quot;);
  106. }
  107. &#47;&#47;&#47; title
  108. var title = new Column(
  109. mainAxisAlignment: MainAxisAlignment.center,
  110. crossAxisAlignment: CrossAxisAlignment.start,
  111. children: &lt;Widget&gt;[
  112. const Text(&#39;CharacteristicTile title&#39;),
  113. new Text(
  114. &#39;0x${characteristic.uuid.toString().toUpperCase().substring(4, 8)}&#39;,
  115. style: Theme.of(context)
  116. .textTheme
  117. .body1
  118. .copyWith(color: Theme.of(context).textTheme.caption.color))
  119. ],
  120. );
  121. &#47;&#47;&#47; subscribe
  122. var actions = new Row(
  123. mainAxisSize: MainAxisSize.min,
  124. children: &lt;Widget&gt;[
  125. new IconButton(
  126. icon: new Icon(
  127. characteristic.isNotifying ? Icons.sync_disabled : Icons.sync,
  128. color: Theme.of(context).iconTheme.color.withOpacity(0.5)),
  129. onPressed: onNotificationPressed,
  130. )
  131. ],
  132. );
  133. return new ListTile(
  134. title: title,
  135. subtitle: new Text(characteristic.value.toString()),
  136. trailing: actions,
  137. );
  138. &#47;&#47;onNotificationPressed();
  139. &#47;*if (descriptorTiles.length &gt; 0) {
  140. return new ExpansionTile(
  141. title: new ListTile(
  142. title: title,
  143. subtitle: new Text(characteristic.value.toString()),
  144. contentPadding: EdgeInsets.all(0.0),
  145. ),
  146. trailing: actions,
  147. children: descriptorTiles,
  148. );
  149. } else {*&#47;
  150. }</code></pre>
  151. </section>
  152. </div> <!-- /.main-content -->
  153. <div class="col-xs-6 col-sm-6 col-md-2 sidebar sidebar-offcanvas-right">
  154. </div><!--/.sidebar-offcanvas-->
  155. </main>
  156. <footer>
  157. <span class="no-break">
  158. touch_demonstrator 1.0.0+1
  159. </span>
  160. </footer>
  161. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
  162. <script src="static-assets/typeahead.bundle.min.js"></script>
  163. <script src="static-assets/highlight.pack.js"></script>
  164. <script src="static-assets/URI.js"></script>
  165. <script src="static-assets/script.js"></script>
  166. </body>
  167. </html>