Skip to content

Text font weight flickers when changing any color value of the AnimatedTheme #30259

@hacker1024

Description

@hacker1024

Problem

I've tested changing the primarySwatch and the scaffoldBackgroundColor.

When I change a color value in an AnimatedTheme, any text widgets without custom themes will have their font weight reduced for a split second, before turning back to normal. I've written a simple app to show this here.

Example

Example

flutter doctor -v

$ flutter doctor -v
[✓] Flutter (Channel stable, v1.2.1, on Linux, locale en_GB.UTF-8)
    • Flutter version 1.2.1 at /home/<USERNAME>/Flutter
    • Framework revision 8661d8aecd (6 weeks ago), 2019-02-14 19:19:53 -0800
    • Engine revision 3757390fa4
    • Dart version 2.1.2 (build 2.1.2-dev.0.0 0a7dcf17eb)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /home/<USERNAME>/Android/Sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • Java binary at: /home/<USERNAME>/.local/share/JetBrains/Toolbox/apps/AndroidStudio/ch-0/191.5409101/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b16-5323222)
    • All Android licenses accepted.

[✓] Android Studio (version 3.5)
    • Android Studio at /home/<USERNAME>/.local/share/JetBrains/Toolbox/apps/AndroidStudio/ch-0/191.5409101
    • Flutter plugin version 34.0.4
    • Dart plugin version 191.6183.87
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b16-5323222)

[✓] IntelliJ IDEA Ultimate Edition (version 2019.1.old)
    • IntelliJ at /home/<USERNAME>/.local/share/JetBrains/Toolbox/apps/IDEA-JDK11/ch-0/191.6183.87
    • Flutter plugin version 34.0.4
    • Dart plugin version 191.6183.87

[✓] Connected device (1 available)
    • Poco F1 • <SERIAL> • android-arm64 • Android 9 (API 28)

• No issues found!

Metadata

Metadata

Assignees

No one assigned

    Labels

    f: material designflutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions