91 lines
3.1 KiB
Dart
91 lines
3.1 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'app_colors.dart';
|
|
import 'app_text_styles.dart';
|
|
|
|
/// ThemeData for light and dark modes, Material 3 enabled.
|
|
class AppTheme {
|
|
AppTheme._();
|
|
|
|
static ThemeData get light => ThemeData(
|
|
useMaterial3: true,
|
|
brightness: Brightness.light,
|
|
colorScheme: AppColors.lightColorScheme,
|
|
scaffoldBackgroundColor: AppColors.backgroundLight,
|
|
textTheme: AppTextStyles.textTheme.apply(
|
|
bodyColor: AppColors.textPrimaryLight,
|
|
displayColor: AppColors.textPrimaryLight,
|
|
),
|
|
appBarTheme: const AppBarTheme(
|
|
backgroundColor: Colors.transparent,
|
|
elevation: 0,
|
|
scrolledUnderElevation: 0,
|
|
centerTitle: true,
|
|
iconTheme: IconThemeData(color: AppColors.textPrimaryLight),
|
|
titleTextStyle: TextStyle(
|
|
color: AppColors.textPrimaryLight,
|
|
fontSize: 20,
|
|
fontWeight: FontWeight.w700,
|
|
),
|
|
),
|
|
bottomNavigationBarTheme: const BottomNavigationBarThemeData(
|
|
backgroundColor: AppColors.surfaceLight,
|
|
selectedItemColor: AppColors.navActiveGoldDeep,
|
|
unselectedItemColor: AppColors.textSecondaryLight,
|
|
type: BottomNavigationBarType.fixed,
|
|
elevation: 0,
|
|
),
|
|
cardTheme: CardThemeData(
|
|
color: AppColors.surfaceLightElevated,
|
|
elevation: 0,
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(16),
|
|
side: const BorderSide(
|
|
color: AppColors.cream,
|
|
),
|
|
),
|
|
),
|
|
dividerColor: AppColors.cream,
|
|
);
|
|
|
|
static ThemeData get dark => ThemeData(
|
|
useMaterial3: true,
|
|
brightness: Brightness.dark,
|
|
colorScheme: AppColors.darkColorScheme,
|
|
scaffoldBackgroundColor: AppColors.backgroundDark,
|
|
textTheme: AppTextStyles.textTheme.apply(
|
|
bodyColor: AppColors.textPrimaryDark,
|
|
displayColor: AppColors.textPrimaryDark,
|
|
),
|
|
appBarTheme: const AppBarTheme(
|
|
backgroundColor: Colors.transparent,
|
|
elevation: 0,
|
|
scrolledUnderElevation: 0,
|
|
centerTitle: true,
|
|
iconTheme: IconThemeData(color: AppColors.textPrimaryDark),
|
|
titleTextStyle: TextStyle(
|
|
color: AppColors.textPrimaryDark,
|
|
fontSize: 20,
|
|
fontWeight: FontWeight.w700,
|
|
),
|
|
),
|
|
bottomNavigationBarTheme: const BottomNavigationBarThemeData(
|
|
backgroundColor: AppColors.surfaceDark,
|
|
selectedItemColor: AppColors.navActiveGold,
|
|
unselectedItemColor: AppColors.textSecondaryDark,
|
|
type: BottomNavigationBarType.fixed,
|
|
elevation: 0,
|
|
),
|
|
cardTheme: CardThemeData(
|
|
color: AppColors.surfaceDarkElevated,
|
|
elevation: 0,
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(16),
|
|
side: BorderSide(
|
|
color: AppColors.brandTeal500.withValues(alpha: 0.22),
|
|
),
|
|
),
|
|
),
|
|
dividerColor: AppColors.surfaceDarkElevated,
|
|
);
|
|
}
|