feat: update login, event detail, theme, and API client
- Improved event detail page with carousel, map, and layout fixes - Updated login screen with video background and glassmorphism - API client development mode with mock responses - Theme manager and main app updates Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -10,9 +10,15 @@ class ThemeManager {
|
||||
|
||||
/// Call during app startup to load saved preference.
|
||||
static Future<void> init() async {
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
final isDark = prefs.getBool(_prefKey) ?? false;
|
||||
themeMode.value = isDark ? ThemeMode.dark : ThemeMode.light;
|
||||
try {
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
final isDark = prefs.getBool(_prefKey) ?? false;
|
||||
themeMode.value = isDark ? ThemeMode.dark : ThemeMode.light;
|
||||
} catch (e) {
|
||||
// If SharedPreferences fails, default to light theme
|
||||
print('Error initializing theme: $e');
|
||||
themeMode.value = ThemeMode.light;
|
||||
}
|
||||
}
|
||||
|
||||
/// Set theme and persist
|
||||
|
||||
Reference in New Issue
Block a user