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:
@@ -39,9 +39,12 @@ class MyApp extends StatelessWidget {
|
||||
},
|
||||
);
|
||||
|
||||
static const String _fontFamily = 'Gilroy';
|
||||
|
||||
ThemeData _lightTheme() {
|
||||
return ThemeData(
|
||||
brightness: Brightness.light,
|
||||
fontFamily: _fontFamily,
|
||||
primarySwatch: primarySwatch,
|
||||
scaffoldBackgroundColor: const Color(0xFFF7F5FB),
|
||||
appBarTheme: const AppBarTheme(
|
||||
@@ -61,9 +64,9 @@ class MyApp extends StatelessWidget {
|
||||
}
|
||||
|
||||
ThemeData _darkTheme() {
|
||||
// Basic dark theme based on your sample — tweak colors as desired
|
||||
return ThemeData(
|
||||
brightness: Brightness.dark,
|
||||
fontFamily: _fontFamily,
|
||||
primarySwatch: primarySwatch,
|
||||
scaffoldBackgroundColor: const Color(0xFF0B1220),
|
||||
appBarTheme: const AppBarTheme(
|
||||
@@ -75,7 +78,7 @@ class MyApp extends StatelessWidget {
|
||||
style: ElevatedButton.styleFrom(backgroundColor: const Color(0xFF0B63D6)),
|
||||
),
|
||||
cardColor: const Color(0xFF0E1620),
|
||||
textTheme: ThemeData.dark().textTheme,
|
||||
textTheme: ThemeData.dark().textTheme.apply(fontFamily: _fontFamily),
|
||||
useMaterial3: false,
|
||||
);
|
||||
}
|
||||
@@ -115,9 +118,17 @@ class _StartupScreenState extends State<StartupScreen> {
|
||||
}
|
||||
|
||||
Future<void> _loadLoginState() async {
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
final hasEmail = prefs.getString('email') != null && prefs.getString('email')!.isNotEmpty;
|
||||
setState(() => _loggedIn = hasEmail);
|
||||
try {
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
final hasEmail = prefs.getString('email') != null && prefs.getString('email')!.isNotEmpty;
|
||||
setState(() => _loggedIn = hasEmail);
|
||||
} catch (e) {
|
||||
// If SharedPreferences fails (common on web with plugin issues), default to not logged in
|
||||
print('Error loading login state: $e');
|
||||
if (mounted) {
|
||||
setState(() => _loggedIn = false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
Reference in New Issue
Block a user