We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The defined system brightness does not function when on used on Windows in combination with a FluentApp.
The following line does not work:
fluent_ui/lib/src/app.dart
Line 390 in 3975a77
Workaround right now is: FluentApp( theme: ThemeData( brightness: MediaQueryData.fromWindow(WidgetsBinding.instance!.window).platformBrightness, ) )
FluentApp( theme: ThemeData( brightness: MediaQueryData.fromWindow(WidgetsBinding.instance!.window).platformBrightness, ) )
Not entirely sure if there is a better way to do this?
The text was updated successfully, but these errors were encountered:
In fact, yes that's work. That's only doesn't work on root context. Do this for confirm that:
builder: (context, _) { print(MediaQuery.platformBrightnessOf(context)); return Text('text') },
flutter: Brightness.dark
Your theme is not correct, because you need to create a themeData for dark and light theme.
Add this for resolve your problem:
return FluentApp( themeMode: ThemeMode.system, theme: ThemeData( brightness: Brightness.light, ), darkTheme: ThemeData( brightness: Brightness.dark, ), ... );
Please reopen this issue if that doesn't solve your problem.
Sorry, something went wrong.
No branches or pull requests
The defined system brightness does not function when on used on Windows in combination with a FluentApp.
The following line does not work:
fluent_ui/lib/src/app.dart
Line 390 in 3975a77
Workaround right now is:
FluentApp( theme: ThemeData( brightness: MediaQueryData.fromWindow(WidgetsBinding.instance!.window).platformBrightness, ) )
Not entirely sure if there is a better way to do this?
The text was updated successfully, but these errors were encountered: