handleThemeSelectionChanged method

void handleThemeSelectionChanged(
  1. BuildContext context,
  2. ThemeMode themeMode
)

Called when the user changes the theme of the application. The themeMode parameter is the new theme of the application.

Implementation

void handleThemeSelectionChanged(BuildContext context, ThemeMode themeMode) {
  final settingsBloc = FastAppSettingsBloc.instance;
  final theme = themeMode.name;

  settingsBloc.addEvent(FastAppSettingsBlocEvent.themeChanged(theme));
}