<p dir="auto">Not able to recognize the Future and List s in a specific file in my flutter application.</p>
<p dir="auto">This change occurred after I upgraded flutter to the latest version, master channel. Tried <code class="notranslate">flutter clean</code> and also tried <code class="notranslate">pub cache repair</code>. Thought it was something related to my editor. Switched to Android studio and experiencing the same error. Even <code class="notranslate">flutter run</code> isn't running anymore.</p>
<p dir="auto">There's another file with the exact same code but different DB name and that is working just fine.</p>
<p dir="auto">Any help is appreciated. Thank you.</p>
<p dir="auto"><code class="notranslate">flutter doctor -v</code></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[✓] Flutter (Channel master, v0.11.5-pre.40, on Linux, locale en_US.UTF-8)
    • Flutter version 0.11.5-pre.40 at /opt/flutter
    • Framework revision e8e1ae8f53 (22 minutes ago), 2018-11-13 19:55:15 -0800
    • Engine revision 4959b71d6a
    • Dart version 2.1.0 (build 2.1.0-dev.9.4 9c07fb64c4)

[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    • Android SDK at /root/Android/Sdk
    • Android NDK at /root/Android/Sdk/ndk-bundle
    • Platform android-27, build-tools 27.0.3
    • Java binary at: /opt/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)
    • All Android licenses accepted.

[✓] Android Studio (version 3.0)
    • Android Studio at /opt/android-studio
    • Flutter plugin version 23.2.1
    • Dart plugin version 171.4424
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)

[✓] VS Code (version 1.28.2)
    • VS Code at /usr/share/code
    • Flutter extension version 2.20.0

[!] Connected device
    ! No devices available

! Doctor found issues in 1 category.
"><pre class="notranslate"><code class="notranslate">[✓] Flutter (Channel master, v0.11.5-pre.40, on Linux, locale en_US.UTF-8)
    • Flutter version 0.11.5-pre.40 at /opt/flutter
    • Framework revision e8e1ae8f53 (22 minutes ago), 2018-11-13 19:55:15 -0800
    • Engine revision 4959b71d6a
    • Dart version 2.1.0 (build 2.1.0-dev.9.4 9c07fb64c4)

[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    • Android SDK at /root/Android/Sdk
    • Android NDK at /root/Android/Sdk/ndk-bundle
    • Platform android-27, build-tools 27.0.3
    • Java binary at: /opt/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)
    • All Android licenses accepted.

[✓] Android Studio (version 3.0)
    • Android Studio at /opt/android-studio
    • Flutter plugin version 23.2.1
    • Dart plugin version 171.4424
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)

[✓] VS Code (version 1.28.2)
    • VS Code at /usr/share/code
    • Flutter extension version 2.20.0

[!] Connected device
    ! No devices available

! Doctor found issues in 1 category.

</code></pre></div>
<p dir="auto"><code class="notranslate">flutter analyze</code></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Running &quot;flutter packages get&quot; in chatjournal2dev...         1.2s
Analyzing chatjournal2dev...                                     

   info • Unused import: 'dart:async' • lib/database/eventsdb.dart:8:8 • unused_import
  error • Future isn't a type • lib/database/eventsdb.dart:13:3 • not_a_type
  error • Future isn't a type • lib/database/eventsdb.dart:99:3 • not_a_type
  error • The name 'List' isn't a type so it can't be used as a type argument • lib/database/eventsdb.dart:99:10 • non_type_as_type_argument
  error • List isn't a type • lib/database/eventsdb.dart:101:5 • not_a_type
  error • The name 'List' isn't a class • lib/database/eventsdb.dart:101:30 • new_with_non_type
  error • List isn't a type • lib/database/eventsdb.dart:104:5 • not_a_type
  error • Future isn't a type • lib/database/eventsdb.dart:128:3 • not_a_type
  error • List isn't a type • lib/database/eventsdb.dart:129:34 • not_a_type
  error • List isn't a type • lib/database/eventsdb.dart:132:5 • not_a_type
  error • The name 'List' isn't a class • lib/database/eventsdb.dart:132:26 • new_with_non_type
  error • Future isn't a type • lib/database/eventsdb.dart:181:3 • not_a_type
  error • List isn't a type • lib/database/eventsdb.dart:182:32 • not_a_type
  error • List isn't a type • lib/database/eventsdb.dart:185:5 • not_a_type
  error • The name 'List' isn't a class • lib/database/eventsdb.dart:185:26 • new_with_non_type
   info • Name non-constant identifiers using lowerCamelCase • lib/database/eventsdb.dart:234:3 • non_constant_identifier_names
  error • Expected to find ';' • lib/database/eventsdb.dart:234:3 • expected_token
  error • Variables must be declared using the keywords 'const', 'final', 'var' or a type name • lib/database/eventsdb.dart:234:3 • missing_const_final_var_or_type
  error • Methods must have an explicit list of parameters • lib/database/eventsdb.dart:234:9 • missing_method_parameters
  error • Operator '&lt;&lt;' should declare exactly 1 parameter(s), but 0 found • lib/database/eventsdb.dart:234:9 • wrong_number_of_parameters_for_operator
  error • Operator declarations must be preceeded by the keyword 'operator' • lib/database/eventsdb.dart:234:9 • missing_keyword_operator
   info • Name non-constant identifiers using lowerCamelCase • lib/database/eventsdb.dart:234:11 • non_constant_identifier_names
  error • A function body must be provided • lib/database/eventsdb.dart:234:11 • missing_function_body
  error • Methods must have an explicit list of parameters • lib/database/eventsdb.dart:234:11 • missing_method_parameters
  error • A function body must be provided • lib/database/eventsdb.dart:234:20 • missing_function_body
  error • Methods must have an explicit list of parameters • lib/database/eventsdb.dart:234:20 • missing_method_parameters
  error • Operator '&gt;' should declare exactly 1 parameter(s), but 0 found • lib/database/eventsdb.dart:234:20 • wrong_number_of_parameters_for_operator
  error • Operator declarations must be preceeded by the keyword 'operator' • lib/database/eventsdb.dart:234:20 • missing_keyword_operator
  error • A function body must be provided • lib/database/eventsdb.dart:234:22 • missing_function_body
  error • Undefined class 'getGroupedData' • lib/database/eventsdb.dart:234:22 • undefined_class
   info • Name non-constant identifiers using lowerCamelCase • lib/database/eventsdb.dart:237:3 • non_constant_identifier_names
  error • Methods must have an explicit list of parameters • lib/database/eventsdb.dart:237:3 • missing_method_parameters
  error • The name 'Future' is already defined • lib/database/eventsdb.dart:237:3 • duplicate_definition
  error • Expected to find '&gt;' • lib/database/eventsdb.dart:237:10 • expected_token
  error • A function body must be provided • lib/database/eventsdb.dart:237:23 • missing_function_body
  error • List isn't a type • lib/database/eventsdb.dart:238:7 • not_a_type
  error • List isn't a type • lib/database/eventsdb.dart:240:5 • not_a_type
  error • The name 'List' isn't a class • lib/database/eventsdb.dart:240:30 • new_with_non_type
  error • List isn't a type • lib/database/eventsdb.dart:243:5 • not_a_type
  error • Future isn't a type • lib/database/eventsdb.dart:292:3 • not_a_type
  error • The name 'List' isn't a type so it can't be used as a type argument • lib/database/eventsdb.dart:292:10 • non_type_as_type_argument
  error • List isn't a type • lib/database/eventsdb.dart:297:5 • not_a_type
  error • Future isn't a type • lib/database/eventsdb.dart:317:3 • not_a_type
  error • The name 'List' isn't a type so it can't be used as a type argument • lib/database/eventsdb.dart:317:10 • non_type_as_type_argument
  error • List isn't a type • lib/database/eventsdb.dart:319:5 • not_a_type
  error • The name 'List' isn't a class • lib/database/eventsdb.dart:319:30 • new_with_non_type
  error • List isn't a type • lib/database/eventsdb.dart:321:5 • not_a_type
  error • Future isn't a type • lib/database/eventsdb.dart:345:3 • not_a_type
  error • The name 'List' isn't a type so it can't be used as a type argument • lib/database/eventsdb.dart:345:10 • non_type_as_type_argument
  error • List isn't a type • lib/database/eventsdb.dart:347:5 • not_a_type
  error • The name 'List' isn't a class • lib/database/eventsdb.dart:347:30 • new_with_non_type
  error • List isn't a type • lib/database/eventsdb.dart:350:5 • not_a_type
  error • Future isn't a type • lib/database/eventsdb.dart:374:3 • not_a_type
  error • The name 'List' isn't a type so it can't be used as a type argument • lib/database/eventsdb.dart:374:10 • non_type_as_type_argument
  error • List isn't a type • lib/database/eventsdb.dart:375:7 • not_a_type
  error • List isn't a type • lib/database/eventsdb.dart:377:5 • not_a_type
  error • The name 'List' isn't a class • lib/database/eventsdb.dart:377:30 • new_with_non_type
  error • List isn't a type • lib/database/eventsdb.dart:380:5 • not_a_type
  error • Future isn't a type • lib/database/eventsdb.dart:428:3 • not_a_type
  error • The name 'List' isn't a type so it can't be used as a type argument • lib/database/eventsdb.dart:428:10 • non_type_as_type_argument
  error • List isn't a type • lib/database/eventsdb.dart:430:5 • not_a_type
  error • The name 'List' isn't a class • lib/database/eventsdb.dart:430:30 • new_with_non_type
  error • List isn't a type • lib/database/eventsdb.dart:431:5 • not_a_type
  error • Future isn't a type • lib/database/eventsdb.dart:440:3 • not_a_type
  error • List isn't a type • lib/database/eventsdb.dart:446:26 • not_a_type
  error • Future isn't a type • lib/database/eventsdb.dart:467:3 • not_a_type
  error • The name 'List' isn't a type so it can't be used as a type argument • lib/database/eventsdb.dart:467:10 • non_type_as_type_argument
  error • The name 'List' isn't a class • lib/database/eventsdb.dart:470:22 • new_with_non_type
  error • List isn't a type • lib/database/eventsdb.dart:472:5 • not_a_type
   info • The method '_showAboutDialog' isn't used • lib/pages/aboutpage.dart:52:3 • unused_element
   info • The exception variable 'e' isn't used, so the 'catch' clause can be removed • lib/pages/feedbackpage.dart:91:33 • unused_catch_clause
   info • This function has a return type of 'Future&lt;bool&gt;', but doesn't end with a return statement • lib/pages/localbackupspage.dart:67:5 • missing_return
   info • The method '_onValueChanged' isn't used • lib/pages/logspage.dart:380:3 • unused_element
   info • The method '_dbQueryForEventsBetweenXY' isn't used • lib/pages/logspage/analyticspage.dart:119:3 • unused_element
   info • The value of the local variable '_topRowForFilterAndDtBound' isn't used • lib/pages/logspage/analyticspage.dart:388:9 • unused_local_variable
   info • 'child' is deprecated and shouldn't be used • lib/pages/logspage/analyticspage.dart:469:19 • deprecated_member_use
   info • The function '_getAnalyticsBody' isn't used • lib/pages/logspage/analyticspage.dart:968:5 • unused_element
   info • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) • lib/pages/logspage/analyticspage.dart:1352:7 •
          must_be_immutable
   info • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) • lib/pages/logspage/logcreationpage.dart:10:7 •
          must_be_immutable
   info • Avoid empty statements • lib/pages/logspage/logcreationpage.dart:138:5 • empty_statements
   info • 'child' is deprecated and shouldn't be used • lib/pages/logspage/logspagebody.dart:69:19 • deprecated_member_use
   info • The exception variable 'e' isn't used, so the 'catch' clause can be removed • lib/pages/logspage/logspagebody.dart:106:33 • unused_catch_clause
   info • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) • lib/pages/logspage/timeline.dart:15:7 •
          must_be_immutable
   info • 'child' is deprecated and shouldn't be used • lib/pages/logspage/timeline.dart:402:25 • deprecated_member_use
   info • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) • lib/pages/logspage/timeline.dart:415:7 •
          must_be_immutable
   info • The function '_onValueChanged' isn't used • lib/pages/settingsPage.dart:161:5 • unused_element
   info • 'child' is deprecated and shouldn't be used • lib/pages/settingsPage.dart:222:17 • deprecated_member_use
   info • 'child' is deprecated and shouldn't be used • lib/pages/settingsPage.dart:261:17 • deprecated_member_use
   info • Name non-constant identifiers using lowerCamelCase • lib/utils/colors.dart:3:17 • non_constant_identifier_names
   info • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) • lib/utils/keypad/keypad.dart:3:7 • must_be_immutable

90 issues found. (ran in 20.2s)"><pre class="notranslate"><code class="notranslate">Running "flutter packages get" in chatjournal2dev...         1.2s
Analyzing chatjournal2dev...                                     

   info • Unused import: 'dart:async' • lib/database/eventsdb.dart:8:8 • unused_import
  error • Future isn't a type • lib/database/eventsdb.dart:13:3 • not_a_type
  error • Future isn't a type • lib/database/eventsdb.dart:99:3 • not_a_type
  error • The name 'List' isn't a type so it can't be used as a type argument • lib/database/eventsdb.dart:99:10 • non_type_as_type_argument
  error • List isn't a type • lib/database/eventsdb.dart:101:5 • not_a_type
  error • The name 'List' isn't a class • lib/database/eventsdb.dart:101:30 • new_with_non_type
  error • List isn't a type • lib/database/eventsdb.dart:104:5 • not_a_type
  error • Future isn't a type • lib/database/eventsdb.dart:128:3 • not_a_type
  error • List isn't a type • lib/database/eventsdb.dart:129:34 • not_a_type
  error • List isn't a type • lib/database/eventsdb.dart:132:5 • not_a_type
  error • The name 'List' isn't a class • lib/database/eventsdb.dart:132:26 • new_with_non_type
  error • Future isn't a type • lib/database/eventsdb.dart:181:3 • not_a_type
  error • List isn't a type • lib/database/eventsdb.dart:182:32 • not_a_type
  error • List isn't a type • lib/database/eventsdb.dart:185:5 • not_a_type
  error • The name 'List' isn't a class • lib/database/eventsdb.dart:185:26 • new_with_non_type
   info • Name non-constant identifiers using lowerCamelCase • lib/database/eventsdb.dart:234:3 • non_constant_identifier_names
  error • Expected to find ';' • lib/database/eventsdb.dart:234:3 • expected_token
  error • Variables must be declared using the keywords 'const', 'final', 'var' or a type name • lib/database/eventsdb.dart:234:3 • missing_const_final_var_or_type
  error • Methods must have an explicit list of parameters • lib/database/eventsdb.dart:234:9 • missing_method_parameters
  error • Operator '&lt;&lt;' should declare exactly 1 parameter(s), but 0 found • lib/database/eventsdb.dart:234:9 • wrong_number_of_parameters_for_operator
  error • Operator declarations must be preceeded by the keyword 'operator' • lib/database/eventsdb.dart:234:9 • missing_keyword_operator
   info • Name non-constant identifiers using lowerCamelCase • lib/database/eventsdb.dart:234:11 • non_constant_identifier_names
  error • A function body must be provided • lib/database/eventsdb.dart:234:11 • missing_function_body
  error • Methods must have an explicit list of parameters • lib/database/eventsdb.dart:234:11 • missing_method_parameters
  error • A function body must be provided • lib/database/eventsdb.dart:234:20 • missing_function_body
  error • Methods must have an explicit list of parameters • lib/database/eventsdb.dart:234:20 • missing_method_parameters
  error • Operator '&gt;' should declare exactly 1 parameter(s), but 0 found • lib/database/eventsdb.dart:234:20 • wrong_number_of_parameters_for_operator
  error • Operator declarations must be preceeded by the keyword 'operator' • lib/database/eventsdb.dart:234:20 • missing_keyword_operator
  error • A function body must be provided • lib/database/eventsdb.dart:234:22 • missing_function_body
  error • Undefined class 'getGroupedData' • lib/database/eventsdb.dart:234:22 • undefined_class
   info • Name non-constant identifiers using lowerCamelCase • lib/database/eventsdb.dart:237:3 • non_constant_identifier_names
  error • Methods must have an explicit list of parameters • lib/database/eventsdb.dart:237:3 • missing_method_parameters
  error • The name 'Future' is already defined • lib/database/eventsdb.dart:237:3 • duplicate_definition
  error • Expected to find '&gt;' • lib/database/eventsdb.dart:237:10 • expected_token
  error • A function body must be provided • lib/database/eventsdb.dart:237:23 • missing_function_body
  error • List isn't a type • lib/database/eventsdb.dart:238:7 • not_a_type
  error • List isn't a type • lib/database/eventsdb.dart:240:5 • not_a_type
  error • The name 'List' isn't a class • lib/database/eventsdb.dart:240:30 • new_with_non_type
  error • List isn't a type • lib/database/eventsdb.dart:243:5 • not_a_type
  error • Future isn't a type • lib/database/eventsdb.dart:292:3 • not_a_type
  error • The name 'List' isn't a type so it can't be used as a type argument • lib/database/eventsdb.dart:292:10 • non_type_as_type_argument
  error • List isn't a type • lib/database/eventsdb.dart:297:5 • not_a_type
  error • Future isn't a type • lib/database/eventsdb.dart:317:3 • not_a_type
  error • The name 'List' isn't a type so it can't be used as a type argument • lib/database/eventsdb.dart:317:10 • non_type_as_type_argument
  error • List isn't a type • lib/database/eventsdb.dart:319:5 • not_a_type
  error • The name 'List' isn't a class • lib/database/eventsdb.dart:319:30 • new_with_non_type
  error • List isn't a type • lib/database/eventsdb.dart:321:5 • not_a_type
  error • Future isn't a type • lib/database/eventsdb.dart:345:3 • not_a_type
  error • The name 'List' isn't a type so it can't be used as a type argument • lib/database/eventsdb.dart:345:10 • non_type_as_type_argument
  error • List isn't a type • lib/database/eventsdb.dart:347:5 • not_a_type
  error • The name 'List' isn't a class • lib/database/eventsdb.dart:347:30 • new_with_non_type
  error • List isn't a type • lib/database/eventsdb.dart:350:5 • not_a_type
  error • Future isn't a type • lib/database/eventsdb.dart:374:3 • not_a_type
  error • The name 'List' isn't a type so it can't be used as a type argument • lib/database/eventsdb.dart:374:10 • non_type_as_type_argument
  error • List isn't a type • lib/database/eventsdb.dart:375:7 • not_a_type
  error • List isn't a type • lib/database/eventsdb.dart:377:5 • not_a_type
  error • The name 'List' isn't a class • lib/database/eventsdb.dart:377:30 • new_with_non_type
  error • List isn't a type • lib/database/eventsdb.dart:380:5 • not_a_type
  error • Future isn't a type • lib/database/eventsdb.dart:428:3 • not_a_type
  error • The name 'List' isn't a type so it can't be used as a type argument • lib/database/eventsdb.dart:428:10 • non_type_as_type_argument
  error • List isn't a type • lib/database/eventsdb.dart:430:5 • not_a_type
  error • The name 'List' isn't a class • lib/database/eventsdb.dart:430:30 • new_with_non_type
  error • List isn't a type • lib/database/eventsdb.dart:431:5 • not_a_type
  error • Future isn't a type • lib/database/eventsdb.dart:440:3 • not_a_type
  error • List isn't a type • lib/database/eventsdb.dart:446:26 • not_a_type
  error • Future isn't a type • lib/database/eventsdb.dart:467:3 • not_a_type
  error • The name 'List' isn't a type so it can't be used as a type argument • lib/database/eventsdb.dart:467:10 • non_type_as_type_argument
  error • The name 'List' isn't a class • lib/database/eventsdb.dart:470:22 • new_with_non_type
  error • List isn't a type • lib/database/eventsdb.dart:472:5 • not_a_type
   info • The method '_showAboutDialog' isn't used • lib/pages/aboutpage.dart:52:3 • unused_element
   info • The exception variable 'e' isn't used, so the 'catch' clause can be removed • lib/pages/feedbackpage.dart:91:33 • unused_catch_clause
   info • This function has a return type of 'Future&lt;bool&gt;', but doesn't end with a return statement • lib/pages/localbackupspage.dart:67:5 • missing_return
   info • The method '_onValueChanged' isn't used • lib/pages/logspage.dart:380:3 • unused_element
   info • The method '_dbQueryForEventsBetweenXY' isn't used • lib/pages/logspage/analyticspage.dart:119:3 • unused_element
   info • The value of the local variable '_topRowForFilterAndDtBound' isn't used • lib/pages/logspage/analyticspage.dart:388:9 • unused_local_variable
   info • 'child' is deprecated and shouldn't be used • lib/pages/logspage/analyticspage.dart:469:19 • deprecated_member_use
   info • The function '_getAnalyticsBody' isn't used • lib/pages/logspage/analyticspage.dart:968:5 • unused_element
   info • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) • lib/pages/logspage/analyticspage.dart:1352:7 •
          must_be_immutable
   info • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) • lib/pages/logspage/logcreationpage.dart:10:7 •
          must_be_immutable
   info • Avoid empty statements • lib/pages/logspage/logcreationpage.dart:138:5 • empty_statements
   info • 'child' is deprecated and shouldn't be used • lib/pages/logspage/logspagebody.dart:69:19 • deprecated_member_use
   info • The exception variable 'e' isn't used, so the 'catch' clause can be removed • lib/pages/logspage/logspagebody.dart:106:33 • unused_catch_clause
   info • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) • lib/pages/logspage/timeline.dart:15:7 •
          must_be_immutable
   info • 'child' is deprecated and shouldn't be used • lib/pages/logspage/timeline.dart:402:25 • deprecated_member_use
   info • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) • lib/pages/logspage/timeline.dart:415:7 •
          must_be_immutable
   info • The function '_onValueChanged' isn't used • lib/pages/settingsPage.dart:161:5 • unused_element
   info • 'child' is deprecated and shouldn't be used • lib/pages/settingsPage.dart:222:17 • deprecated_member_use
   info • 'child' is deprecated and shouldn't be used • lib/pages/settingsPage.dart:261:17 • deprecated_member_use
   info • Name non-constant identifiers using lowerCamelCase • lib/utils/colors.dart:3:17 • non_constant_identifier_names
   info • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) • lib/utils/keypad/keypad.dart:3:7 • must_be_immutable

90 issues found. (ran in 20.2s)
</code></pre></div>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/13075880/48406157-cb142200-e759-11e8-8a4b-88489b9885f5.png"><img src="https://user-images.githubusercontent.com/13075880/48406157-cb142200-e759-11e8-8a4b-88489b9885f5.png" alt="screenshot" style="max-width: 100%;"></a></p>
<h2 dir="auto">Steps to Reproduce</h2>

<ol dir="auto">
<li></li>
</ol>
<div class="highlight highlight-source-dart notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class TextPage extends StatelessWidget {
  TextPage(@required this.title);

  String title;
  final String defTitle = &quot;文字样式&quot;;

  Widget _sectionTitle(String title) {
    return new Center(
      heightFactor: 2.6,
      child: new Text(&quot;xx控件控件xx文字xx文字&quot;,
          style: new TextStyle(
              fontSize: 18.0,
              background: (new Paint()..color = Colors.grey),
              color: Colors.white)),
    );
  }

  @override
  Widget build(BuildContext context) {
    // TODO: implement build

    return new Scaffold(
        appBar: new AppBar(
          title: new Text(title != null ? title : defTitle),
          centerTitle: true,
        ),
        body: new SingleChildScrollView(
          child: new Center(
            child: new Column(
              children: &lt;Widget&gt;[
                _sectionTitle(&quot;控件Text控件&quot;.toString()),
                new Text(&quot;Hello World &quot;, textAlign: TextAlign.center),
                new Text(&quot;Hello World * 4&quot; * 10,
                    maxLines: 2, overflow: TextOverflow.ellipsis),
                new Text(&quot;Hello world&quot;, textScaleFactor: 1.5),
                new Center(
                  child: new Text(&quot;Hello World汉字yinwen&quot;,
                      textAlign: TextAlign.center,
                      style: new TextStyle(
                          color: Colors.blueAccent,
                          background: new Paint()..color = Colors.greenAccent,
                          decoration: TextDecoration.underline,
                          decorationStyle: TextDecorationStyle.dotted)),
                )
              ],
            ),
          ),
        ));
  }
}"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-c1">TextPage</span> <span class="pl-k">extends</span> <span class="pl-c1">StatelessWidget</span> {
  <span class="pl-c1">TextPage</span>(<span class="pl-k">@required</span> <span class="pl-c1">this</span>.title);

  <span class="pl-c1">String</span> title;
  <span class="pl-k">final</span> <span class="pl-c1">String</span> defTitle <span class="pl-k">=</span> <span class="pl-s">"文字样式"</span>;

  <span class="pl-c1">Widget</span> <span class="pl-en">_sectionTitle</span>(<span class="pl-c1">String</span> title) {
    <span class="pl-k">return</span> <span class="pl-k">new</span> <span class="pl-c1">Center</span>(
      heightFactor<span class="pl-k">:</span> <span class="pl-c1">2.6</span>,
      child<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">Text</span>(<span class="pl-s">"xx控件控件xx文字xx文字"</span>,
          style<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">TextStyle</span>(
              fontSize<span class="pl-k">:</span> <span class="pl-c1">18.0</span>,
              background<span class="pl-k">:</span> (<span class="pl-k">new</span> <span class="pl-c1">Paint</span>()..color <span class="pl-k">=</span> <span class="pl-c1">Colors</span>.grey),
              color<span class="pl-k">:</span> <span class="pl-c1">Colors</span>.white)),
    );
  }

  <span class="pl-k">@override</span>
  <span class="pl-c1">Widget</span> <span class="pl-en">build</span>(<span class="pl-c1">BuildContext</span> context) {
    <span class="pl-c">// TODO: implement build</span>

    <span class="pl-k">return</span> <span class="pl-k">new</span> <span class="pl-c1">Scaffold</span>(
        appBar<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">AppBar</span>(
          title<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">Text</span>(title <span class="pl-k">!=</span> <span class="pl-c1">null</span> <span class="pl-k">?</span> title <span class="pl-k">:</span> defTitle),
          centerTitle<span class="pl-k">:</span> <span class="pl-c1">true</span>,
        ),
        body<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">SingleChildScrollView</span>(
          child<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">Center</span>(
            child<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">Column</span>(
              children<span class="pl-k">:</span> <span class="pl-k">&lt;</span><span class="pl-c1">Widget</span><span class="pl-k">&gt;</span>[
                <span class="pl-en">_sectionTitle</span>(<span class="pl-s">"控件Text控件"</span>.<span class="pl-en">toString</span>()),
                <span class="pl-k">new</span> <span class="pl-c1">Text</span>(<span class="pl-s">"Hello World "</span>, textAlign<span class="pl-k">:</span> <span class="pl-c1">TextAlign</span>.center),
                <span class="pl-k">new</span> <span class="pl-c1">Text</span>(<span class="pl-s">"Hello World * 4"</span> <span class="pl-k">*</span> <span class="pl-c1">10</span>,
                    maxLines<span class="pl-k">:</span> <span class="pl-c1">2</span>, overflow<span class="pl-k">:</span> <span class="pl-c1">TextOverflow</span>.ellipsis),
                <span class="pl-k">new</span> <span class="pl-c1">Text</span>(<span class="pl-s">"Hello world"</span>, textScaleFactor<span class="pl-k">:</span> <span class="pl-c1">1.5</span>),
                <span class="pl-k">new</span> <span class="pl-c1">Center</span>(
                  child<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">Text</span>(<span class="pl-s">"Hello World汉字yinwen"</span>,
                      textAlign<span class="pl-k">:</span> <span class="pl-c1">TextAlign</span>.center,
                      style<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">TextStyle</span>(
                          color<span class="pl-k">:</span> <span class="pl-c1">Colors</span>.blueAccent,
                          background<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">Paint</span>()..color <span class="pl-k">=</span> <span class="pl-c1">Colors</span>.greenAccent,
                          decoration<span class="pl-k">:</span> <span class="pl-c1">TextDecoration</span>.underline,
                          decorationStyle<span class="pl-k">:</span> <span class="pl-c1">TextDecorationStyle</span>.dotted)),
                )
              ],
            ),
          ),
        ));
  }
}</pre></div>
<h1 dir="auto"></h1>
<h1 dir="auto">The bug occurred after using TextStyle.background</h1>
<h1 dir="auto"></h1>
<h1 dir="auto"></h1>
<ol start="2" dir="auto">
<li>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/22956309/49988792-11f07400-ffb3-11e8-84dd-84a805a09045.png"><img src="https://user-images.githubusercontent.com/22956309/49988792-11f07400-ffb3-11e8-84dd-84a805a09045.png" alt="image" style="max-width: 100%;"></a></p>
</li>
<li></li>
</ol>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/22956309/49988947-9f33c880-ffb3-11e8-96d4-eabbc55d168e.png"><img src="https://user-images.githubusercontent.com/22956309/49988947-9f33c880-ffb3-11e8-96d4-eabbc55d168e.png" alt="image" style="max-width: 100%;"></a></p>
<ol start="4" dir="auto">
<li></li>
</ol>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/22956309/49989206-75c76c80-ffb4-11e8-9e61-783951342367.png"><img src="https://user-images.githubusercontent.com/22956309/49989206-75c76c80-ffb4-11e8-9e61-783951342367.png" alt="screenshot_2018-12-14-15-24-21-064_com firtflutte" style="max-width: 100%;"></a></p>
<ol start="5" dir="auto">
<li>This is the result of running flutter doctor -v.</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="flutter doctor -v
[√] Flutter (Channel stable, v1.0.0, on Microsoft Windows [Version 10.0.17134.376], locale zh-CN)
    • Flutter version 1.0.0 at C:\src\flutter
    • Framework revision 5391447fae (2 weeks ago), 2018-11-29 19:41:26 -0800
    • Engine revision 7375a0f414
    • Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)

[√] Android toolchain - develop for Android devices (Android SDK 28.0.3)
    • Android SDK at C:\Users\Administrator\AppData\Local\Android\Sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • ANDROID_HOME = C:\Users\Administrator\AppData\Local\Android\Sdk
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
    • All Android licenses accepted.

[√] Android Studio (version 3.2)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 31.2.1
    • Dart plugin version 181.5656
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)

[√] Connected device (1 available)
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android 6.0 (API 23) (emulator)

• No issues found!"><pre class="notranslate"><code class="notranslate">flutter doctor -v
[√] Flutter (Channel stable, v1.0.0, on Microsoft Windows [Version 10.0.17134.376], locale zh-CN)
    • Flutter version 1.0.0 at C:\src\flutter
    • Framework revision 5391447fae (2 weeks ago), 2018-11-29 19:41:26 -0800
    • Engine revision 7375a0f414
    • Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)

[√] Android toolchain - develop for Android devices (Android SDK 28.0.3)
    • Android SDK at C:\Users\Administrator\AppData\Local\Android\Sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • ANDROID_HOME = C:\Users\Administrator\AppData\Local\Android\Sdk
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
    • All Android licenses accepted.

[√] Android Studio (version 3.2)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 31.2.1
    • Dart plugin version 181.5656
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)

[√] Connected device (1 available)
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android 6.0 (API 23) (emulator)

• No issues found!
</code></pre></div>
<h2 dir="auto">Logs</h2>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div>