import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'app_colors.dart'; /// Application Theme Configuration class AppTheme { static ThemeData get lightTheme { return ThemeData( useMaterial3: true, brightness: Brightness.light, colorScheme: ColorScheme.fromSeed( seedColor: AppColors.primaryBlue, brightness: Brightness.light, primary: AppColors.primaryBlue, secondary: AppColors.primaryTeal, surface: AppColors.surface, background: AppColors.background, error: AppColors.error, ), // App Bar Theme appBarTheme: const AppBarTheme( backgroundColor: AppColors.surface, foregroundColor: AppColors.textPrimary, elevation: 0, centerTitle: true, systemOverlayStyle: SystemUiOverlayStyle.dark, titleTextStyle: TextStyle( color: AppColors.textPrimary, fontSize: 18, fontWeight: FontWeight.w600, ), ), // Card Theme cardTheme: CardThemeData( color: AppColors.cardBackground, elevation: 2, shadowColor: Colors.black.withOpacity(0.08), shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)), margin: const EdgeInsets.symmetric(horizontal: 16, vertical: 8), ), // Elevated Button Theme elevatedButtonTheme: ElevatedButtonThemeData( style: ElevatedButton.styleFrom( backgroundColor: AppColors.buttonPrimary, foregroundColor: Colors.white, elevation: 2, shadowColor: AppColors.primaryBlue.withOpacity(0.3), shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(12), ), padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 16), textStyle: const TextStyle(fontSize: 16, fontWeight: FontWeight.w600), ), ), // Outlined Button Theme outlinedButtonTheme: OutlinedButtonThemeData( style: OutlinedButton.styleFrom( foregroundColor: AppColors.primaryBlue, side: BorderSide(color: AppColors.primaryBlue.withOpacity(0.3)), shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(12), ), padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 16), textStyle: const TextStyle(fontSize: 16, fontWeight: FontWeight.w600), ), ), // Text Button Theme textButtonTheme: TextButtonThemeData( style: TextButton.styleFrom( foregroundColor: AppColors.primaryBlue, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12), textStyle: const TextStyle(fontSize: 14, fontWeight: FontWeight.w600), ), ), // Input Field Theme inputDecorationTheme: InputDecorationTheme( filled: true, fillColor: AppColors.surface, border: OutlineInputBorder( borderRadius: BorderRadius.circular(12), borderSide: BorderSide(color: AppColors.primaryBlue.withOpacity(0.3)), ), enabledBorder: OutlineInputBorder( borderRadius: BorderRadius.circular(12), borderSide: BorderSide(color: AppColors.primaryBlue.withOpacity(0.3)), ), focusedBorder: OutlineInputBorder( borderRadius: BorderRadius.circular(12), borderSide: const BorderSide(color: AppColors.primaryBlue, width: 2), ), errorBorder: OutlineInputBorder( borderRadius: BorderRadius.circular(12), borderSide: const BorderSide(color: AppColors.error), ), contentPadding: const EdgeInsets.symmetric( horizontal: 16, vertical: 12, ), hintStyle: const TextStyle(color: AppColors.textHint, fontSize: 14), labelStyle: const TextStyle( color: AppColors.textSecondary, fontSize: 14, fontWeight: FontWeight.w500, ), ), // Text Field Theme textSelectionTheme: TextSelectionThemeData( cursorColor: AppColors.primaryBlue, selectionColor: AppColors.primaryBlue.withOpacity(0.3), selectionHandleColor: AppColors.primaryBlue, ), // Text Theme textTheme: const TextTheme( displayLarge: TextStyle( color: AppColors.textPrimary, fontSize: 32, fontWeight: FontWeight.bold, ), displayMedium: TextStyle( color: AppColors.textPrimary, fontSize: 28, fontWeight: FontWeight.bold, ), displaySmall: TextStyle( color: AppColors.textPrimary, fontSize: 24, fontWeight: FontWeight.bold, ), headlineLarge: TextStyle( color: AppColors.textPrimary, fontSize: 22, fontWeight: FontWeight.w600, ), headlineMedium: TextStyle( color: AppColors.textPrimary, fontSize: 20, fontWeight: FontWeight.w600, ), headlineSmall: TextStyle( color: AppColors.textPrimary, fontSize: 18, fontWeight: FontWeight.w600, ), titleLarge: TextStyle( color: AppColors.textPrimary, fontSize: 16, fontWeight: FontWeight.w600, ), titleMedium: TextStyle( color: AppColors.textPrimary, fontSize: 14, fontWeight: FontWeight.w600, ), titleSmall: TextStyle( color: AppColors.textPrimary, fontSize: 12, fontWeight: FontWeight.w600, ), bodyLarge: TextStyle( color: AppColors.textPrimary, fontSize: 16, fontWeight: FontWeight.normal, ), bodyMedium: TextStyle( color: AppColors.textPrimary, fontSize: 14, fontWeight: FontWeight.normal, ), bodySmall: TextStyle( color: AppColors.textSecondary, fontSize: 12, fontWeight: FontWeight.normal, ), labelLarge: TextStyle( color: AppColors.textPrimary, fontSize: 14, fontWeight: FontWeight.w500, ), labelMedium: TextStyle( color: AppColors.textSecondary, fontSize: 12, fontWeight: FontWeight.w500, ), labelSmall: TextStyle( color: AppColors.textHint, fontSize: 10, fontWeight: FontWeight.w500, ), ), // Bottom Navigation Bar Theme bottomNavigationBarTheme: const BottomNavigationBarThemeData( backgroundColor: AppColors.surface, selectedItemColor: AppColors.primaryBlue, unselectedItemColor: AppColors.iconInactive, type: BottomNavigationBarType.fixed, elevation: 8, selectedLabelStyle: TextStyle( fontSize: 12, fontWeight: FontWeight.w600, ), unselectedLabelStyle: TextStyle( fontSize: 12, fontWeight: FontWeight.normal, ), ), // Floating Action Button Theme floatingActionButtonTheme: FloatingActionButtonThemeData( backgroundColor: AppColors.primaryBlue, foregroundColor: Colors.white, elevation: 4, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)), ), // Divider Theme dividerTheme: const DividerThemeData( color: AppColors.buttonSecondary, thickness: 1, space: 1, ), // Icon Theme iconTheme: const IconThemeData(color: AppColors.iconActive, size: 24), // Progress Indicator Theme progressIndicatorTheme: const ProgressIndicatorThemeData( color: AppColors.primaryBlue, linearTrackColor: AppColors.buttonSecondary, circularTrackColor: AppColors.buttonSecondary, ), // Chip Theme chipTheme: ChipThemeData( backgroundColor: AppColors.buttonSecondary, selectedColor: AppColors.primaryBlue.withOpacity(0.1), disabledColor: AppColors.buttonSecondary.withOpacity(0.5), labelStyle: const TextStyle(color: AppColors.textPrimary), secondaryLabelStyle: const TextStyle(color: AppColors.textPrimary), padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8), shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), ), ); } static ThemeData get darkTheme { return ThemeData( useMaterial3: true, brightness: Brightness.dark, colorScheme: ColorScheme.fromSeed( seedColor: AppColors.primaryBlue, brightness: Brightness.dark, primary: AppColors.primaryBlue, secondary: AppColors.primaryTeal, surface: AppColors.darkSurface, background: AppColors.darkBackground, error: AppColors.error, ), // Dark mode specific overrides would go here appBarTheme: const AppBarTheme( backgroundColor: AppColors.darkSurface, foregroundColor: AppColors.darkTextPrimary, elevation: 0, centerTitle: true, systemOverlayStyle: SystemUiOverlayStyle.light, titleTextStyle: TextStyle( color: AppColors.darkTextPrimary, fontSize: 18, fontWeight: FontWeight.w600, ), ), cardTheme: CardThemeData( color: AppColors.darkSurface, elevation: 2, shadowColor: Colors.black.withOpacity(0.3), shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)), margin: const EdgeInsets.symmetric(horizontal: 16, vertical: 8), ), // Input Field Theme for Dark Mode inputDecorationTheme: InputDecorationTheme( filled: true, fillColor: AppColors.darkSurface, border: OutlineInputBorder( borderRadius: BorderRadius.circular(12), borderSide: BorderSide(color: AppColors.primaryBlue.withOpacity(0.3)), ), enabledBorder: OutlineInputBorder( borderRadius: BorderRadius.circular(12), borderSide: BorderSide(color: AppColors.primaryBlue.withOpacity(0.3)), ), focusedBorder: OutlineInputBorder( borderRadius: BorderRadius.circular(12), borderSide: const BorderSide(color: AppColors.primaryBlue, width: 2), ), errorBorder: OutlineInputBorder( borderRadius: BorderRadius.circular(12), borderSide: const BorderSide(color: AppColors.error), ), contentPadding: const EdgeInsets.symmetric( horizontal: 16, vertical: 12, ), hintStyle: const TextStyle( color: AppColors.darkTextSecondary, fontSize: 14, ), labelStyle: const TextStyle( color: AppColors.darkTextSecondary, fontSize: 14, fontWeight: FontWeight.w500, ), ), // Text Field Theme for Dark Mode textSelectionTheme: TextSelectionThemeData( cursorColor: AppColors.primaryBlue, selectionColor: AppColors.primaryBlue.withOpacity(0.3), selectionHandleColor: AppColors.primaryBlue, ), textTheme: const TextTheme( displayLarge: TextStyle( color: AppColors.darkTextPrimary, fontSize: 32, fontWeight: FontWeight.bold, ), displayMedium: TextStyle( color: AppColors.darkTextPrimary, fontSize: 28, fontWeight: FontWeight.bold, ), displaySmall: TextStyle( color: AppColors.darkTextPrimary, fontSize: 24, fontWeight: FontWeight.bold, ), headlineLarge: TextStyle( color: AppColors.darkTextPrimary, fontSize: 22, fontWeight: FontWeight.w600, ), headlineMedium: TextStyle( color: AppColors.darkTextPrimary, fontSize: 20, fontWeight: FontWeight.w600, ), headlineSmall: TextStyle( color: AppColors.darkTextPrimary, fontSize: 18, fontWeight: FontWeight.w600, ), titleLarge: TextStyle( color: AppColors.darkTextPrimary, fontSize: 16, fontWeight: FontWeight.w600, ), titleMedium: TextStyle( color: AppColors.darkTextPrimary, fontSize: 14, fontWeight: FontWeight.w600, ), titleSmall: TextStyle( color: AppColors.darkTextPrimary, fontSize: 12, fontWeight: FontWeight.w600, ), bodyLarge: TextStyle( color: AppColors.darkTextPrimary, fontSize: 16, fontWeight: FontWeight.normal, ), bodyMedium: TextStyle( color: AppColors.darkTextPrimary, fontSize: 14, fontWeight: FontWeight.normal, ), bodySmall: TextStyle( color: AppColors.darkTextSecondary, fontSize: 12, fontWeight: FontWeight.normal, ), labelLarge: TextStyle( color: AppColors.darkTextPrimary, fontSize: 14, fontWeight: FontWeight.w500, ), labelMedium: TextStyle( color: AppColors.darkTextSecondary, fontSize: 12, fontWeight: FontWeight.w500, ), labelSmall: TextStyle( color: AppColors.darkTextSecondary, fontSize: 10, fontWeight: FontWeight.w500, ), ), ); } }