Skip to content

[Windows] themeMode.system does not pick up on the Windows system theme #54612

@GroovinChip

Description

@GroovinChip

Steps to reproduce:

  1. Create a new Flutter project on the master branch on a Windows 10 machine that supports toggling between light and dark theme
  2. Add
darkTheme: ThemeData.dark(),
themeMode: ThemeMode.system,

to the MaterialApp and run the application
3. Observe that if you toggle the Windows theme between dark and light, the Flutter application will not reflect the theme change

Flutter doctor -v:

[√] Flutter (Channel master, v1.18.0-5.0.pre.96, on Microsoft Windows [Version 10.0.18363.752], locale en-US)
    • Flutter version 1.18.0-5.0.pre.96 at C:\flutter
    • Framework revision 7f56b53de4 (2 hours ago), 2020-04-12 12:00:01 -0400
    • Engine revision beb8a7ec48
    • Dart version 2.8.0 (build 2.8.0-dev.20.0 89b0f67261)

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at C:\Users\ReubenT\AppData\Local\Android\sdk
    • Platform android-R, build-tools 29.0.3
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.1.6)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
    • Visual Studio Community 2019 version 16.1.29102.190

[√] Android Studio (version 3.6)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 45.1.1
    • Dart plugin version 192.7761
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)

[√] IntelliJ IDEA Community Edition (version 2019.2)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2019.1.3
    • Flutter plugin version 41.2.3
    • Dart plugin version 192.7761

[√] VS Code (version 1.43.2)
    • VS Code at C:\Users\ReubenT\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.9.0


Scanning for devices is taking a long time...-Terminate batch job (Y/N)? y

C:\Users\ReubenT\FlutterProjects\experiments\windows_theme_bug>flutter doctor -v
[√] Flutter (Channel master, v1.18.0-5.0.pre.96, on Microsoft Windows [Version 10.0.18363.752], locale en-US)
    • Flutter version 1.18.0-5.0.pre.96 at C:\flutter
    • Framework revision 7f56b53de4 (2 hours ago), 2020-04-12 12:00:01 -0400
    • Engine revision beb8a7ec48
    • Dart version 2.8.0 (build 2.8.0-dev.20.0 89b0f67261)

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at C:\Users\ReubenT\AppData\Local\Android\sdk
    • Platform android-R, build-tools 29.0.3
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.1.6)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
    • Visual Studio Community 2019 version 16.1.29102.190

[√] Android Studio (version 3.6)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 45.1.1
    • Dart plugin version 192.7761
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)

[√] IntelliJ IDEA Community Edition (version 2019.2)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2019.1.3
    • Flutter plugin version 41.2.3
    • Dart plugin version 192.7761

[√] VS Code (version 1.43.2)
    • VS Code at C:\Users\ReubenT\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.9.0

(cannot include the devices section as it has been hanging indefinitely...O_O)

Windows version:
1909 build 18363.752

Most recent flutter upgrade was today.

Metadata

Metadata

Assignees

Labels

P3Issues that are less important to the Flutter projecta: desktopRunning on desktopc: new featureNothing broken; request for a new capabilityengineflutter/engine related. See also e: labels.platform-windowsBuilding on or for Windows specifically

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions