Explorar el Código

change theme icon of theme change

ashilkn hace 2 años
padre
commit
56ede836b0
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      lib/ui/settings/theme_switch_widget.dart

+ 3 - 1
lib/ui/settings/theme_switch_widget.dart

@@ -48,7 +48,9 @@ class _ThemeSwitchWidgetState extends State<ThemeSwitchWidget> {
           text: "Theme",
         ),
         isHeaderOfExpansion: true,
-        leadingIcon: Icons.light_mode_outlined,
+        leadingIcon: Theme.of(context).brightness == Brightness.light
+            ? Icons.light_mode_outlined
+            : Icons.dark_mode_outlined,
         trailingIcon: Icons.expand_more,
         menuItemColor:
             Theme.of(context).colorScheme.enteTheme.colorScheme.fillFaint,