From d4b15aee4dee8680f9a971cef3eb20365db882d1 Mon Sep 17 00:00:00 2001 From: Benjamin <73490201+BenjaminHalko@users.noreply.github.com> Date: Sat, 24 Feb 2024 18:37:55 -0800 Subject: [PATCH] fix: Specify that dark theme is dark (#1699) --- lib/ui/theme/dynamic_theme_builder.dart | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/lib/ui/theme/dynamic_theme_builder.dart b/lib/ui/theme/dynamic_theme_builder.dart index 94a93b97ae..876a6d23c7 100644 --- a/lib/ui/theme/dynamic_theme_builder.dart +++ b/lib/ui/theme/dynamic_theme_builder.dart @@ -28,7 +28,6 @@ class DynamicThemeBuilder extends StatefulWidget { class _DynamicThemeBuilderState extends State with WidgetsBindingObserver { Brightness brightness = PlatformDispatcher.instance.platformBrightness; - final ManagerAPI _managerAPI = locator(); @override void initState() { @@ -36,22 +35,6 @@ class _DynamicThemeBuilderState extends State 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 textTheme: GoogleFonts.robotoTextTheme(ThemeData.light().textTheme), ); final ThemeData darkDynamicTheme = ThemeData( + brightness: Brightness.dark, useMaterial3: true, navigationBarTheme: NavigationBarThemeData( labelTextStyle: MaterialStateProperty.all(