diff --git a/flutter/lib/common.dart b/flutter/lib/common.dart index eac7fbf9b..4c298d917 100644 --- a/flutter/lib/common.dart +++ b/flutter/lib/common.dart @@ -215,18 +215,15 @@ class MyTheme { } static void changeDarkMode(ThemeMode mode) { - final preference = getThemeModePreference(); - if (preference != mode) { + Get.changeThemeMode(mode); + if (desktopType == DesktopType.main) { if (mode == ThemeMode.system) { bind.mainSetLocalOption(key: kCommConfKeyTheme, value: ''); } else { bind.mainSetLocalOption( key: kCommConfKeyTheme, value: mode.toShortString()); } - Get.changeThemeMode(mode); - if (desktopType == DesktopType.main) { - bind.mainChangeTheme(dark: currentThemeMode().toShortString()); - } + bind.mainChangeTheme(dark: currentThemeMode().toShortString()); } }