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(