Closed edwardaux closed 3 years ago
@edwardaux This doesn't really depend on this package. If you have passed AdaptiveThemeMode.system
then it should work! I don't have a macOS system but I'll check the same with Windows.
@edwardaux So I checked with Windows and it seems that something's wrong with Flutter SDK itself.
Try this simple example and it doesn't involve using the library and it should based on which theme has been set system wide but it doesn't work on windows. Maybe you could check the same on Mac?
MaterialApp(
title: 'System Theme Demo',
theme: ThemeData.light(),
darkTheme: ThemeData.dark(),
home: MyHomePage(),
);
@edwardaux Check this thread: https://github.com/flutter/flutter/issues/86975#issuecomment-890751189
Ah, yes indeed, that's the problem. Running from the command line, the simple example above works just fine (even without adaptive_theme
). Looks like it is only a problem when running from VS Code.
I'll close this ticket out then. Thanks for tracking down the problem.
Happy to help! ☺️ 👍🏻
For some reason, if I switch the macOS theme from light to dark (or vice versa) in System Settings, my macOS flutter app doesn't dynamically switch.
If I'm running the app from VS Code and manually reload (or do a full restart), then it will use whatever the system is at that time. However, if I switch the operating system setting after starting the app, it doesn't dynamically change.
Is the expected behaviour that the new theme is only re-applied after app restart?
Steps to reproduce the behavior:
Observe that the flutter app theme doesn't change dynamically