Browse Source

change theme icon of theme change

ashilkn 2 years ago
parent
commit
56ede836b0
1 changed files with 3 additions and 1 deletions
  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",
           text: "Theme",
         ),
         ),
         isHeaderOfExpansion: true,
         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,
         trailingIcon: Icons.expand_more,
         menuItemColor:
         menuItemColor:
             Theme.of(context).colorScheme.enteTheme.colorScheme.fillFaint,
             Theme.of(context).colorScheme.enteTheme.colorScheme.fillFaint,