at main 2.2 kB view raw
1import 'package:flutter/material.dart'; 2 3class AppTheme { 4 static const Color primaryColor = Color(0xFF0EA5E9); 5 static const Color scaffoldBackgroundColor = Color(0xFFF8FAFC); 6 static const Color favoriteColor = Color(0xFFEC4899); 7 8 static final ThemeData lightTheme = ThemeData( 9 brightness: Brightness.light, 10 primaryColor: primaryColor, 11 scaffoldBackgroundColor: scaffoldBackgroundColor, 12 appBarTheme: const AppBarTheme( 13 backgroundColor: scaffoldBackgroundColor, 14 foregroundColor: Colors.black87, 15 elevation: 0, 16 iconTheme: IconThemeData(color: Colors.black87), 17 titleTextStyle: TextStyle(color: Colors.black87, fontSize: 18, fontWeight: FontWeight.w600), 18 ), 19 floatingActionButtonTheme: const FloatingActionButtonThemeData( 20 backgroundColor: primaryColor, 21 foregroundColor: Colors.white, 22 shape: CircleBorder(), 23 ), 24 dividerColor: Colors.grey[300], 25 colorScheme: ColorScheme.light( 26 primary: primaryColor, 27 surface: Colors.grey[200]!, 28 onSurface: Colors.black87, 29 onSurfaceVariant: Colors.black54, 30 onPrimary: Colors.white, 31 onSecondary: Colors.black87, 32 onError: Colors.redAccent, 33 ), 34 // Add more theme customizations as needed 35 ); 36 37 static final ThemeData darkTheme = ThemeData( 38 brightness: Brightness.dark, 39 primaryColor: primaryColor, 40 scaffoldBackgroundColor: Colors.black, 41 appBarTheme: const AppBarTheme( 42 backgroundColor: Colors.black, 43 foregroundColor: Colors.white, 44 elevation: 0, 45 iconTheme: IconThemeData(color: Colors.white), 46 titleTextStyle: TextStyle(color: Colors.white, fontSize: 18, fontWeight: FontWeight.w600), 47 ), 48 floatingActionButtonTheme: const FloatingActionButtonThemeData( 49 backgroundColor: primaryColor, 50 foregroundColor: Colors.white, 51 shape: CircleBorder(), 52 ), 53 dividerColor: Colors.grey[900], 54 colorScheme: ColorScheme.dark( 55 primary: primaryColor, 56 surface: Colors.grey[900]!, 57 onSurface: Colors.white, 58 onSurfaceVariant: Colors.white70, 59 onPrimary: Colors.white, 60 onSecondary: Colors.white, 61 onError: Colors.redAccent, 62 ), 63 // Add more theme customizations as needed 64 ); 65}