dispatchThemeModeChanged method

void dispatchThemeModeChanged(
  1. FastThemeBloc themeBloc,
  2. ThemeMode themeMode
)

Dispatches a theme mode change event. It is used to update the theme of the application.

Implementation

void dispatchThemeModeChanged(FastThemeBloc themeBloc, ThemeMode themeMode) {
  switch (themeMode) {
    case ThemeMode.light:
      themeBloc.addEvent(const FastThemeBlocEvent.light());
    case ThemeMode.dark:
      themeBloc.addEvent(const FastThemeBlocEvent.dark());
    default:
      themeBloc.addEvent(const FastThemeBlocEvent.system());
  }
}