changeThemeMode method

Future<void> changeThemeMode(
  1. ThemeMode themeModel
)

Implementation

Future<void> changeThemeMode(ThemeMode themeModel) async {
  await AppSettingCache().saveAndUpdate(
      (oldValue) =>
          oldValue?.copyWith(themeModel: themeModel.getThemeModeIndex),
      AppSettingCache().themeKey,
      const AppLocalSettingModel());
}