toggleTheme function

void toggleTheme()

Toggle theme function

Implementation

void toggleTheme() {
  final current = _themeNotifier.value;
  if (current == ThemeMode.light) {
    _themeNotifier.value = ThemeMode.dark;
  } else if (current == ThemeMode.dark) {
    _themeNotifier.value = ThemeMode.light;
  } else {
    // If system, toggle to light
    _themeNotifier.value = ThemeMode.light;
  }
}