Skip to content

[Web] : TextStyle color does not work with backgroundColor using canvasKit #73473

@yakou32

Description

@yakou32
  1. Run flutter create bug.

  2. 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,
   ),
),
  1. 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)

Metadata

Metadata

Assignees

Labels

a: typographyText rendering, possibly libtxtassigned for triageissue is assigned to a domain expert for further triagec: renderingUI glitches reported at the engine/skia or impeller rendering levele: web_canvaskitCanvasKit (a.k.a. Skia-on-WebGL) rendering backend for Webfound in release: 1.25Found to occur in 1.25has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specifically

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions