build.html 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  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, height=device-height, initial-scale=1, user-scalable=no">
  7. <meta name="description" content="API docs for the build method from the ReadingTextField class, for the Dart programming language.">
  8. <title>build method - ReadingTextField class - note library - Dart API</title>
  9. <link rel="preconnect" href="https://fonts.gstatic.com">
  10. <link href="https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap" rel="stylesheet">
  11. <link href="https://fonts.googleapis.com/icon?family=Material+Icons" 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 data-base-href="../../"
  17. data-using-base-href="false">
  18. <div id="overlay-under-drawer"></div>
  19. <header id="title">
  20. <button id="sidenav-left-toggle" type="button">&nbsp;</button>
  21. <ol class="breadcrumbs gt-separated dark hidden-xs">
  22. <li><a href="../../index.html">trpp</a></li>
  23. <li><a href="../../screens_note/screens_note-library.html">note</a></li>
  24. <li><a href="../../screens_note/ReadingTextField-class.html">ReadingTextField</a></li>
  25. <li class="self-crumb">build method</li>
  26. </ol>
  27. <div class="self-name">build</div>
  28. <form class="search navbar-right" role="search">
  29. <input type="text" id="search-box" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
  30. </form>
  31. </header>
  32. <main>
  33. <div id="dartdoc-sidebar-left" class="sidebar sidebar-offcanvas-left">
  34. <header id="header-search-sidebar" class="hidden-l">
  35. <form class="search-sidebar" role="search">
  36. <input type="text" id="search-sidebar" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
  37. </form>
  38. </header>
  39. <ol class="breadcrumbs gt-separated dark hidden-l" id="sidebar-nav">
  40. <li><a href="../../index.html">trpp</a></li>
  41. <li><a href="../../screens_note/screens_note-library.html">note</a></li>
  42. <li><a href="../../screens_note/ReadingTextField-class.html">ReadingTextField</a></li>
  43. <li class="self-crumb">build method</li>
  44. </ol>
  45. <h5>ReadingTextField class</h5>
  46. <ol>
  47. <li class="section-title"><a href="../../screens_note/ReadingTextField-class.html#constructors">Constructors</a></li>
  48. <li><a href="../../screens_note/ReadingTextField/ReadingTextField.html">ReadingTextField</a></li>
  49. <li class="section-title">
  50. <a href="../../screens_note/ReadingTextField-class.html#instance-properties">Properties</a>
  51. </li>
  52. <li><a href="../../screens_note/ReadingTextField/fontSize.html">fontSize</a></li>
  53. <li><a href="../../screens_note/ReadingTextField/fontWeight.html">fontWeight</a></li>
  54. <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/Widget/hashCode.html">hashCode</a></li>
  55. <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/Widget/key.html">key</a></li>
  56. <li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html">runtimeType</a></li>
  57. <li><a href="../../screens_note/ReadingTextField/text.html">text</a></li>
  58. <li class="section-title"><a href="../../screens_note/ReadingTextField-class.html#instance-methods">Methods</a></li>
  59. <li><a href="../../screens_note/ReadingTextField/build.html">build</a></li>
  60. <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/StatelessWidget/createElement.html">createElement</a></li>
  61. <li class="inherited"><a href="https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html">debugDescribeChildren</a></li>
  62. <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html">debugFillProperties</a></li>
  63. <li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html">noSuchMethod</a></li>
  64. <li class="inherited"><a href="https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html">toDiagnosticsNode</a></li>
  65. <li class="inherited"><a href="https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html">toString</a></li>
  66. <li class="inherited"><a href="https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html">toStringDeep</a></li>
  67. <li class="inherited"><a href="https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html">toStringShallow</a></li>
  68. <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html">toStringShort</a></li>
  69. <li class="section-title inherited"><a href="../../screens_note/ReadingTextField-class.html#operators">Operators</a></li>
  70. <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html">operator ==</a></li>
  71. </ol>
  72. </div><!--/.sidebar-offcanvas-->
  73. <div id="dartdoc-main-content" class="main-content">
  74. <div><h1><span class="kind-method">build</span> method </h1></div>
  75. <section class="multi-line-signature">
  76. <div>
  77. <ol class="annotation-list">
  78. <li>@<a href="https://api.flutter.dev/flutter/dart-core/override-constant.html">override</a></li>
  79. </ol>
  80. </div>
  81. <span class="returntype"><a href="https://api.flutter.dev/flutter/widgets/Widget-class.html">Widget</a></span>
  82. <span class="name ">build</span>
  83. (<wbr><ol class="parameter-list"><li><span class="parameter" id="build-param-context"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/widgets/BuildContext-class.html">BuildContext</a></span> <span class="parameter-name">context</span></span></li>
  84. </ol>)
  85. <div class="features">override</div>
  86. </section>
  87. <section class="desc markdown">
  88. <p>Describes the part of the user interface represented by this widget.</p>
  89. <p>The framework calls this method when this widget is inserted into the tree
  90. in a given <a href="https://api.flutter.dev/flutter/widgets/BuildContext-class.html">BuildContext</a> and when the dependencies of this widget change
  91. (e.g., an <a href="https://api.flutter.dev/flutter/widgets/InheritedWidget-class.html">InheritedWidget</a> referenced by this widget changes). This
  92. method can potentially be called in every frame and should not have any side
  93. effects beyond building a widget.</p>
  94. <p>The framework replaces the subtree below this widget with the widget
  95. returned by this method, either by updating the existing subtree or by
  96. removing the subtree and inflating a new subtree, depending on whether the
  97. widget returned by this method can update the root of the existing
  98. subtree, as determined by calling <a href="https://api.flutter.dev/flutter/widgets/Widget/canUpdate.html">Widget.canUpdate</a>.</p>
  99. <p>Typically implementations return a newly created constellation of widgets
  100. that are configured with information from this widget's constructor and
  101. from the given <a href="https://api.flutter.dev/flutter/widgets/BuildContext-class.html">BuildContext</a>.</p>
  102. <p>The given <a href="https://api.flutter.dev/flutter/widgets/BuildContext-class.html">BuildContext</a> contains information about the location in the
  103. tree at which this widget is being built. For example, the context
  104. provides the set of inherited widgets for this location in the tree. A
  105. given widget might be built with multiple different <a href="https://api.flutter.dev/flutter/widgets/BuildContext-class.html">BuildContext</a>
  106. arguments over time if the widget is moved around the tree or if the
  107. widget is inserted into the tree in multiple places at once.</p>
  108. <p>The implementation of this method must only depend on:</p>
  109. <ul>
  110. <li>the fields of the widget, which themselves must not change over time,
  111. and</li>
  112. <li>any ambient state obtained from the <code>context</code> using
  113. <a href="https://api.flutter.dev/flutter/widgets/BuildContext/dependOnInheritedWidgetOfExactType.html">BuildContext.dependOnInheritedWidgetOfExactType</a>.</li>
  114. </ul>
  115. <p>If a widget's <a href="../../screens_note/ReadingTextField/build.html">build</a> method is to depend on anything else, use a
  116. <a href="https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html">StatefulWidget</a> instead.</p>
  117. <p>See also:</p>
  118. <ul>
  119. <li><a href="https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html">StatelessWidget</a>, which contains the discussion on performance considerations.</li>
  120. </ul>
  121. </section>
  122. <section class="summary source-code" id="source">
  123. <h2><span>Implementation</span></h2>
  124. <pre class="language-dart"><code class="language-dart">@override
  125. Widget build(BuildContext context) {
  126. return Padding(
  127. padding: const EdgeInsets.symmetric(horizontal: 20),
  128. child: TextField(
  129. enabled: false,
  130. maxLines: null,
  131. controller: TextEditingController(text: text),
  132. decoration: InputDecoration(fillColor: Colors.transparent),
  133. style: TextStyle(
  134. fontSize: fontSize,
  135. fontWeight: fontWeight,
  136. color: Theme.of(context).primaryColor),
  137. ),
  138. );
  139. }</code></pre>
  140. </section>
  141. </div> <!-- /.main-content -->
  142. <div id="dartdoc-sidebar-right" class="sidebar sidebar-offcanvas-right">
  143. </div><!--/.sidebar-offcanvas-->
  144. </main>
  145. <footer>
  146. <span class="no-break">
  147. trpp
  148. 2.0.0+2
  149. </span>
  150. </footer>
  151. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
  152. <script src="../../static-assets/typeahead.bundle.min.js"></script>
  153. <script src="../../static-assets/highlight.pack.js"></script>
  154. <script src="../../static-assets/script.js"></script>
  155. </body>
  156. </html>