import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; class AppTheme { static ThemeData light() { final base = ThemeData( colorScheme: ColorScheme.fromSeed( seedColor: const Color(0xFF0C4A6E), brightness: Brightness.light, ), useMaterial3: true, ); final textTheme = GoogleFonts.spaceGroteskTextTheme(base.textTheme); return base.copyWith( textTheme: textTheme, scaffoldBackgroundColor: const Color(0xFFF6F8FA), appBarTheme: AppBarTheme( backgroundColor: base.colorScheme.surface, foregroundColor: base.colorScheme.onSurface, elevation: 0, centerTitle: false, titleTextStyle: textTheme.titleLarge?.copyWith( fontWeight: FontWeight.w700, letterSpacing: 0.2, ), ), cardTheme: CardThemeData( color: base.colorScheme.surface, elevation: 0.6, margin: EdgeInsets.zero, shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(16), side: BorderSide(color: base.colorScheme.outlineVariant), ), ), dividerTheme: DividerThemeData( color: base.colorScheme.outlineVariant, thickness: 1, ), inputDecorationTheme: InputDecorationTheme( filled: true, fillColor: base.colorScheme.surface, border: OutlineInputBorder( borderRadius: BorderRadius.circular(12), borderSide: BorderSide(color: base.colorScheme.outlineVariant), ), enabledBorder: OutlineInputBorder( borderRadius: BorderRadius.circular(12), borderSide: BorderSide(color: base.colorScheme.outlineVariant), ), focusedBorder: OutlineInputBorder( borderRadius: BorderRadius.circular(12), borderSide: BorderSide(color: base.colorScheme.primary, width: 1.5), ), ), filledButtonTheme: FilledButtonThemeData( style: FilledButton.styleFrom( shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(12), ), padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 14), ), ), outlinedButtonTheme: OutlinedButtonThemeData( style: OutlinedButton.styleFrom( shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(12), ), side: BorderSide(color: base.colorScheme.outline), padding: const EdgeInsets.symmetric(horizontal: 18, vertical: 12), ), ), navigationRailTheme: NavigationRailThemeData( backgroundColor: base.colorScheme.surface, selectedIconTheme: IconThemeData(color: base.colorScheme.primary), selectedLabelTextStyle: textTheme.labelLarge?.copyWith( fontWeight: FontWeight.w600, ), unselectedIconTheme: IconThemeData(color: base.colorScheme.onSurface), ), navigationBarTheme: NavigationBarThemeData( backgroundColor: base.colorScheme.surface, indicatorColor: base.colorScheme.primaryContainer, labelTextStyle: WidgetStateProperty.all( textTheme.labelMedium?.copyWith(fontWeight: FontWeight.w600), ), ), listTileTheme: ListTileThemeData( shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)), tileColor: base.colorScheme.surface, ), ); } static ThemeData dark() { final base = ThemeData( colorScheme: ColorScheme.fromSeed( seedColor: const Color(0xFF38BDF8), brightness: Brightness.dark, ), useMaterial3: true, ); final textTheme = GoogleFonts.spaceGroteskTextTheme(base.textTheme); return base.copyWith( textTheme: textTheme, scaffoldBackgroundColor: const Color(0xFF0B111A), appBarTheme: AppBarTheme( backgroundColor: base.colorScheme.surface, foregroundColor: base.colorScheme.onSurface, elevation: 0, centerTitle: false, titleTextStyle: textTheme.titleLarge?.copyWith( fontWeight: FontWeight.w700, letterSpacing: 0.2, ), ), cardTheme: CardThemeData( color: const Color(0xFF121A24), elevation: 0, margin: EdgeInsets.zero, shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(16), side: BorderSide(color: base.colorScheme.outlineVariant), ), ), dividerTheme: DividerThemeData( color: base.colorScheme.outlineVariant, thickness: 1, ), inputDecorationTheme: InputDecorationTheme( filled: true, fillColor: const Color(0xFF121A24), border: OutlineInputBorder( borderRadius: BorderRadius.circular(12), borderSide: BorderSide(color: base.colorScheme.outlineVariant), ), enabledBorder: OutlineInputBorder( borderRadius: BorderRadius.circular(12), borderSide: BorderSide(color: base.colorScheme.outlineVariant), ), focusedBorder: OutlineInputBorder( borderRadius: BorderRadius.circular(12), borderSide: BorderSide(color: base.colorScheme.primary, width: 1.5), ), ), filledButtonTheme: FilledButtonThemeData( style: FilledButton.styleFrom( shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(12), ), padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 14), ), ), outlinedButtonTheme: OutlinedButtonThemeData( style: OutlinedButton.styleFrom( shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(12), ), side: BorderSide(color: base.colorScheme.outline), padding: const EdgeInsets.symmetric(horizontal: 18, vertical: 12), ), ), navigationRailTheme: NavigationRailThemeData( backgroundColor: base.colorScheme.surface, selectedIconTheme: IconThemeData(color: base.colorScheme.primary), selectedLabelTextStyle: textTheme.labelLarge?.copyWith( fontWeight: FontWeight.w600, ), unselectedIconTheme: IconThemeData(color: base.colorScheme.onSurface), ), navigationBarTheme: NavigationBarThemeData( backgroundColor: base.colorScheme.surface, indicatorColor: base.colorScheme.primaryContainer, labelTextStyle: WidgetStateProperty.all( textTheme.labelMedium?.copyWith(fontWeight: FontWeight.w600), ), ), listTileTheme: ListTileThemeData( shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)), tileColor: const Color(0xFF121A24), ), ); } }