Issue 1:
Not able to recognize the Future and List s in a specific file in my flutter application.

This change occurred after I upgraded flutter to the latest version, master channel. Tried flutter clean and also tried pub cache repair. Thought it was something related to my editor. Switched to Android studio and experiencing the same error. Even flutter run isn't running anymore.

There's another file with the exact same code but different DB name and that is working just fine.

Any help is appreciated. Thank you.

flutter doctor -v

[✓] 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.

flutter analyze

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 '<<' 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 '>' 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 '>' • 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<bool>', 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)

Issue 2:
Steps to Reproduce

class TextPage extends StatelessWidget {
TextPage(@required this.title);

String title;
final String defTitle = "文字样式";

Widget _sectionTitle(String title) {
return new Center(
heightFactor: 2.6,
child: new Text("xx控件控件xx文字xx文字",
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: <Widget>[
_sectionTitle("控件Text控件".toString()),
new Text("Hello World ", textAlign: TextAlign.center),
new Text("Hello World * 4" * 10,
maxLines: 2, overflow: TextOverflow.ellipsis),
new Text("Hello world", textScaleFactor: 1.5),
new Center(
child: new Text("Hello World汉字yinwen",
textAlign: TextAlign.center,
style: new TextStyle(
color: Colors.blueAccent,
background: new Paint()..color = Colors.greenAccent,
decoration: TextDecoration.underline,
decorationStyle: TextDecorationStyle.dotted)),
)
],
),
),
));
}
}

The bug occurred after using TextStyle.background

This is the result of running flutter doctor -v.

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!

Logs