Open pbaker5 opened 5 years ago
Do you think forcing the app to be dark when the platformBrightness is set to dark is okay (without allowing the user to switch back in the app)?
Yes. I think the OS setting makes the app setting redundant.
We'd still want to have the ability to overwrite that (especially for backward compatibility sake!).
I'm pretty busy over the next couple of days, if you want to, you can open a PR for this, if not I'll look into it once I find the time.
Yes. I think the OS setting makes the app setting redundant.
I agree, perhaps adding a UI toggle for overriding the OS setting would be nice too.
This should be easy with flutter. Just set ThemeMode.system
. Or it's not, I don't fully know how dynamic_theme works under the hood.
The easiest way seems to be indeed setting MaterialApp.themeMode
.
This can be quickly implemented with Provider. This untested example seems to work for me.
On Android Q I'd like to use the OS's Theme option (which is exposed via MediaQuery.of(context).platformBrightness) instead of having another checkbox in my settings section of my app. Can we please have an option to use that as the defaultBrightness? Then I can simply check for Android Q and hide the dark mode checkbox in my settings screen.