fix: Specify that dark theme is dark (#1699)

This commit is contained in:
Benjamin 2024-02-24 18:37:55 -08:00 committed by GitHub
parent d0689555f1
commit d4b15aee4d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -28,7 +28,6 @@ class DynamicThemeBuilder extends StatefulWidget {
class _DynamicThemeBuilderState extends State<DynamicThemeBuilder>
with WidgetsBindingObserver {
Brightness brightness = PlatformDispatcher.instance.platformBrightness;
final ManagerAPI _managerAPI = locator<ManagerAPI>();
@override
void initState() {
@ -36,22 +35,6 @@ class _DynamicThemeBuilderState extends State<DynamicThemeBuilder>
WidgetsBinding.instance.addObserver(this);
}
@override
void didChangePlatformBrightness() {
setState(() {
brightness = PlatformDispatcher.instance.platformBrightness;
});
if (_managerAPI.getThemeMode() < 2) {
SystemChrome.setSystemUIOverlayStyle(
SystemUiOverlayStyle(
systemNavigationBarIconBrightness: brightness == Brightness.light
? Brightness.dark
: Brightness.light,
),
);
}
}
@override
Widget build(BuildContext context) {
return DynamicColorBuilder(
@ -70,6 +53,7 @@ class _DynamicThemeBuilderState extends State<DynamicThemeBuilder>
textTheme: GoogleFonts.robotoTextTheme(ThemeData.light().textTheme),
);
final ThemeData darkDynamicTheme = ThemeData(
brightness: Brightness.dark,
useMaterial3: true,
navigationBarTheme: NavigationBarThemeData(
labelTextStyle: MaterialStateProperty.all(