changeThemeMode method

Future<void> changeThemeMode(
  1. ThemeMode themeMode
)

更改主题

Implementation

Future<void> changeThemeMode(ThemeMode themeMode) async {
  _themeMode = themeMode;
  Get.changeThemeMode(_themeMode);
  if (_themeMode == ThemeMode.system) {
    await setValue(themeCodeKey, 'system');
  } else {
    await setValue(
        themeCodeKey, themeMode == ThemeMode.dark ? 'dark' : 'light');
  }
  updateNavigationBar();
  refreshAppui();
}