themes.dart 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. import 'package:flutter/material.dart';
  2. class AppTheme {
  3. // Colors
  4. static const Color primary = Color(0xFF1A73E8); // Blue accent
  5. static const Color secondary = Color(0xFFF6A14C); // Orange for icons
  6. static const Color background = Colors.white;
  7. static const Color surface = Colors.white;
  8. static const Color textPrimary = Color(0xFF202124);
  9. static const Color textSecondary = Color(0xFF5F6368);
  10. static const Color divider = Color(0xFFE8EAED);
  11. static const Color progressBackground = Color(0xFFE8EAED);
  12. // Text Styles
  13. static const TextTheme textTheme = TextTheme(
  14. displayLarge: TextStyle(
  15. fontSize: 24,
  16. fontWeight: FontWeight.bold,
  17. color: textPrimary,
  18. ),
  19. titleLarge: TextStyle(
  20. fontSize: 18,
  21. fontWeight: FontWeight.w600,
  22. color: textPrimary,
  23. ),
  24. titleMedium: TextStyle(
  25. fontSize: 16,
  26. fontWeight: FontWeight.w500,
  27. color: textPrimary,
  28. ),
  29. bodyLarge: TextStyle(
  30. fontSize: 16,
  31. color: textPrimary,
  32. ),
  33. bodyMedium: TextStyle(
  34. fontSize: 14,
  35. color: textSecondary,
  36. ),
  37. );
  38. static ThemeData get lightTheme {
  39. return ThemeData(
  40. useMaterial3: true,
  41. colorScheme: const ColorScheme.light(
  42. primary: primary,
  43. secondary: secondary,
  44. surface: surface,
  45. onPrimary: Colors.white,
  46. onSecondary: Colors.white,
  47. onSurface: textPrimary,
  48. ),
  49. // Text Theme
  50. textTheme: textTheme,
  51. // AppBar Theme
  52. appBarTheme: const AppBarTheme(
  53. backgroundColor: background,
  54. elevation: 0,
  55. centerTitle: false,
  56. titleTextStyle: TextStyle(
  57. color: textPrimary,
  58. fontSize: 20,
  59. fontWeight: FontWeight.w600,
  60. ),
  61. iconTheme: IconThemeData(color: textPrimary),
  62. ),
  63. // Card Theme
  64. cardTheme: CardTheme(
  65. elevation: 0,
  66. shape: RoundedRectangleBorder(
  67. borderRadius: BorderRadius.circular(12),
  68. side: const BorderSide(color: divider),
  69. ),
  70. color: surface,
  71. ),
  72. // Button Theme
  73. elevatedButtonTheme: ElevatedButtonThemeData(
  74. style: ElevatedButton.styleFrom(
  75. backgroundColor: primary,
  76. foregroundColor: Colors.white,
  77. elevation: 0,
  78. padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 12),
  79. shape: RoundedRectangleBorder(
  80. borderRadius: BorderRadius.circular(8),
  81. ),
  82. ),
  83. ),
  84. // Progress Indicator Theme
  85. progressIndicatorTheme: const ProgressIndicatorThemeData(
  86. color: primary,
  87. linearTrackColor: progressBackground,
  88. ),
  89. // Divider Theme
  90. dividerTheme: const DividerThemeData(
  91. color: divider,
  92. space: 1,
  93. thickness: 1,
  94. ),
  95. // Icon Theme
  96. iconTheme: const IconThemeData(
  97. color: secondary,
  98. size: 24,
  99. ),
  100. );
  101. }
  102. }