switchTheme method
Switch to a specific theme mode
Implementation
Future<void> switchTheme(ThemeMode themeMode) async {
try {
state = themeMode;
await JetStorage.write(_storageKey, themeMode.name);
dump('[ThemeSwitcher] Theme switched to: ${themeMode.name}');
} catch (e, stackTrace) {
dump('[ThemeSwitcher] Error saving theme: $e', stackTrace: stackTrace);
}
}