setThemeMode method

void setThemeMode(
  1. ThemeMode themeMode
)

Set the theme mode (light, dark, or system) This method updates the theme mode and notifies all listeners

Implementation

void setThemeMode(ThemeMode themeMode) {
  if (_isDisposed) return;
  if (_currentThemeMode != themeMode) {
    _currentThemeMode = themeMode;
    _themeModeNotifier.value = themeMode;
    _saveThemeMode(themeMode);
  }
}