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:
2026-03-14 08:57:25 +05:30
parent 4acf75902c
commit e0f34398c2
6 changed files with 662 additions and 268 deletions

View File

@@ -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