app_theme.dart 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. import 'package:flutter/material.dart';
  2. class AppTheme {
  3. static ThemeData light() {
  4. const canvas = Color(0xFFF3EDE0);
  5. const primary = Color(0xFF16423C);
  6. const secondary = Color(0xFFC86B31);
  7. const accent = Color(0xFF234C63);
  8. const surface = Color(0xFFFFFBF5);
  9. const ink = Color(0xFF1F1E1A);
  10. final colorScheme = ColorScheme.fromSeed(
  11. seedColor: primary,
  12. primary: primary,
  13. secondary: secondary,
  14. tertiary: accent,
  15. surface: surface,
  16. brightness: Brightness.light,
  17. );
  18. return ThemeData(
  19. useMaterial3: true,
  20. colorScheme: colorScheme,
  21. scaffoldBackgroundColor: canvas,
  22. appBarTheme: const AppBarTheme(
  23. backgroundColor: Colors.transparent,
  24. foregroundColor: ink,
  25. elevation: 0,
  26. centerTitle: false,
  27. ),
  28. textTheme: const TextTheme(
  29. displaySmall: TextStyle(
  30. fontSize: 34,
  31. height: 1.05,
  32. fontWeight: FontWeight.w800,
  33. color: ink,
  34. ),
  35. headlineMedium: TextStyle(
  36. fontSize: 24,
  37. height: 1.15,
  38. fontWeight: FontWeight.w700,
  39. color: ink,
  40. ),
  41. titleLarge: TextStyle(
  42. fontSize: 20,
  43. fontWeight: FontWeight.w700,
  44. color: ink,
  45. ),
  46. titleMedium: TextStyle(
  47. fontSize: 15,
  48. fontWeight: FontWeight.w700,
  49. color: ink,
  50. ),
  51. bodyLarge: TextStyle(fontSize: 16, height: 1.45, color: ink),
  52. bodyMedium: TextStyle(
  53. fontSize: 14,
  54. height: 1.45,
  55. color: Color(0xFF4A4A43),
  56. ),
  57. ),
  58. cardTheme: CardThemeData(
  59. color: surface,
  60. elevation: 0,
  61. shape: RoundedRectangleBorder(
  62. borderRadius: BorderRadius.circular(28),
  63. side: const BorderSide(color: Color(0xFFD9CEBA)),
  64. ),
  65. ),
  66. filledButtonTheme: FilledButtonThemeData(
  67. style: FilledButton.styleFrom(
  68. backgroundColor: primary,
  69. foregroundColor: Colors.white,
  70. padding: const EdgeInsets.symmetric(horizontal: 18, vertical: 16),
  71. shape: RoundedRectangleBorder(
  72. borderRadius: BorderRadius.circular(18),
  73. ),
  74. textStyle: const TextStyle(fontWeight: FontWeight.w700, fontSize: 15),
  75. ),
  76. ),
  77. outlinedButtonTheme: OutlinedButtonThemeData(
  78. style: OutlinedButton.styleFrom(
  79. foregroundColor: primary,
  80. side: const BorderSide(color: primary),
  81. padding: const EdgeInsets.symmetric(horizontal: 18, vertical: 16),
  82. shape: RoundedRectangleBorder(
  83. borderRadius: BorderRadius.circular(18),
  84. ),
  85. textStyle: const TextStyle(fontWeight: FontWeight.w700, fontSize: 15),
  86. ),
  87. ),
  88. );
  89. }
  90. }