toggleTheme static method
Implementation
static Future<void> toggleTheme() async {
final ThemeMode themeMode = getThemeMode();
switch (themeMode) {
case ThemeMode.system:
case ThemeMode.light:
await setDark();
break;
case ThemeMode.dark:
await setLight();
break;
}
}