updateTheme method

Future<void> updateTheme(
  1. FluttyMaterialTheme theme,
  2. ThemeMode mode
)

Emits the new SelectedTheme and persists it in the background.

Implementation

Future<void> updateTheme(FluttyMaterialTheme theme, ThemeMode mode) async {
  unawaited(_setThemePreferences(theme, mode));

  emit(SelectedTheme(theme: theme, mode: mode));
}