app_theme.dart 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. import 'package:flutter/material.dart';
  2. import 'app_colors.dart';
  3. class AppTheme {
  4. AppTheme._();
  5. static ThemeData get light {
  6. final colorScheme = ColorScheme.fromSeed(
  7. seedColor: AppColors.primary,
  8. brightness: Brightness.light,
  9. );
  10. return ThemeData(
  11. useMaterial3: true,
  12. colorScheme: colorScheme,
  13. scaffoldBackgroundColor: AppColors.background,
  14. appBarTheme: const AppBarTheme(
  15. backgroundColor: AppColors.primary,
  16. foregroundColor: Colors.white,
  17. elevation: 0,
  18. centerTitle: false,
  19. titleTextStyle: TextStyle(
  20. fontSize: 18,
  21. fontWeight: FontWeight.w600,
  22. color: Colors.white,
  23. ),
  24. ),
  25. cardTheme: CardThemeData(
  26. color: AppColors.cardWhite,
  27. elevation: 1,
  28. shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
  29. ),
  30. elevatedButtonTheme: ElevatedButtonThemeData(
  31. style: ElevatedButton.styleFrom(
  32. backgroundColor: AppColors.primary,
  33. foregroundColor: Colors.white,
  34. shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
  35. minimumSize: const Size(double.infinity, 48),
  36. textStyle: const TextStyle(fontSize: 15, fontWeight: FontWeight.w600),
  37. ),
  38. ),
  39. outlinedButtonTheme: OutlinedButtonThemeData(
  40. style: OutlinedButton.styleFrom(
  41. foregroundColor: AppColors.textPrimary,
  42. shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
  43. minimumSize: const Size(double.infinity, 48),
  44. side: const BorderSide(color: Color(0xFFDDDDDD)),
  45. textStyle: const TextStyle(fontSize: 15),
  46. ),
  47. ),
  48. );
  49. }
  50. }