lightTheme static method
Implementation
static ThemeData lightTheme() {
final TextTheme textTheme = AppTextThemes.getTheme(_fontFamily);
return ThemeData(
useMaterial3: true,
brightness: Brightness.light,
primaryColor: AppColors.primary,
colorScheme: ColorScheme.light(
primary: AppColors.primary,
secondary: AppColors.accent,
error: AppColors.error,
background: AppColors.lightBackground,
surface: AppColors.lightSurface,
),
scaffoldBackgroundColor: AppColors.lightBackground,
textTheme: textTheme,
appBarTheme: AppBarTheme(
backgroundColor: AppColors.primary,
elevation: 0,
titleTextStyle: textTheme.titleLarge?.copyWith(
color: Colors.white,
fontWeight: FontWeight.bold,
),
),
elevatedButtonTheme: ElevatedButtonThemeData(
style: ElevatedButton.styleFrom(
backgroundColor: AppColors.primary,
foregroundColor: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
),
padding: EdgeInsets.symmetric(horizontal: 16, vertical: 12),
),
),
outlinedButtonTheme: OutlinedButtonThemeData(
style: OutlinedButton.styleFrom(
foregroundColor: AppColors.primary,
side: BorderSide(color: AppColors.primary),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
),
padding: EdgeInsets.symmetric(horizontal: 16, vertical: 12),
),
),
textButtonTheme: TextButtonThemeData(
style: TextButton.styleFrom(
foregroundColor: AppColors.primary,
),
),
cardTheme: CardTheme(
color: AppColors.card,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
),
elevation: 2,
),
inputDecorationTheme: InputDecorationTheme(
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(8),
borderSide: BorderSide(color: AppColors.lightBorder),
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(8),
borderSide: BorderSide(color: AppColors.primary, width: 2),
),
errorBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(8),
borderSide: BorderSide(color: AppColors.error, width: 2),
),
filled: true,
fillColor: Colors.grey.shade50,
),
);
}