-
Run flutter create bug.
-
Update the files as follows:
Just added TextStyle:
Text(
'You have pushed the button this many times:',
style: TextStyle(
color: Colors.white,
backgroundColor: Colors.yellow,
),
),
- Problem
The problem happens with Flutter Web:
color applies a color to the text. But if a backgroundColor is added as well, then color is not applied anymore.
Expected results: White text on yellow background
Actual results: Black text on yellow background
flutter run --verbose
No issues found in the log
flutter analyze
No issues found
flutter doctor
[√] Flutter (Channel beta, 1.25.0-8.2.pre, on Microsoft Windows [version 10.0.18363.1256], locale fr-FR)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.1)
[√] Chrome - develop for the web
[√] Android Studio (version 4.1.0)
[√] VS Code (version 1.52.1)
[√] Connected device (2 available)
Run
flutter create bug.Update the files as follows:
Just added TextStyle:
The problem happens with Flutter Web:
color applies a color to the text. But if a backgroundColor is added as well, then color is not applied anymore.
Expected results: White text on yellow background
Actual results: Black text on yellow background
flutter run --verbose
No issues found in the logflutter analyze
No issues foundflutter doctor
[√] Flutter (Channel beta, 1.25.0-8.2.pre, on Microsoft Windows [version 10.0.18363.1256], locale fr-FR)[√] Android toolchain - develop for Android devices (Android SDK version 30.0.1)
[√] Chrome - develop for the web
[√] Android Studio (version 4.1.0)
[√] VS Code (version 1.52.1)
[√] Connected device (2 available)