You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

102 line
3.1KB

  1. import 'package:flutter/material.dart';
  2. import 'package:google_fonts/google_fonts.dart';
  3. import 'colors.dart';
  4. class AppTheme {
  5. static ThemeData get lightTheme {
  6. return ThemeData(
  7. useMaterial3: true,
  8. colorScheme: ColorScheme.fromSeed(
  9. seedColor: AppColors.primary,
  10. brightness: Brightness.light,
  11. ),
  12. scaffoldBackgroundColor: AppColors.background,
  13. textTheme: GoogleFonts.interTextTheme(ThemeData.light().textTheme),
  14. appBarTheme: AppBarTheme(
  15. backgroundColor: Colors.white,
  16. elevation: 0,
  17. centerTitle: true,
  18. scrolledUnderElevation: 0,
  19. titleTextStyle: GoogleFonts.inter(
  20. fontSize: 20,
  21. fontWeight: FontWeight.w600,
  22. color: AppColors.textPrimary,
  23. ),
  24. iconTheme: const IconThemeData(color: AppColors.textPrimary),
  25. ),
  26. elevatedButtonTheme: ElevatedButtonThemeData(
  27. style: ElevatedButton.styleFrom(
  28. backgroundColor: AppColors.primary,
  29. foregroundColor: Colors.white,
  30. padding: const EdgeInsets.symmetric(horizontal: 32, vertical: 16),
  31. shape: RoundedRectangleBorder(
  32. borderRadius: BorderRadius.circular(12),
  33. ),
  34. elevation: 0,
  35. textStyle: GoogleFonts.inter(
  36. fontSize: 16,
  37. fontWeight: FontWeight.w600,
  38. ),
  39. ),
  40. ),
  41. outlinedButtonTheme: OutlinedButtonThemeData(
  42. style: OutlinedButton.styleFrom(
  43. padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 12),
  44. shape: RoundedRectangleBorder(
  45. borderRadius: BorderRadius.circular(12),
  46. ),
  47. ),
  48. ),
  49. inputDecorationTheme: InputDecorationTheme(
  50. filled: true,
  51. fillColor: Colors.grey[50],
  52. border: OutlineInputBorder(
  53. borderRadius: BorderRadius.circular(12),
  54. borderSide: BorderSide(color: Colors.grey[300]!),
  55. ),
  56. enabledBorder: OutlineInputBorder(
  57. borderRadius: BorderRadius.circular(12),
  58. borderSide: BorderSide(color: Colors.grey[300]!),
  59. ),
  60. focusedBorder: OutlineInputBorder(
  61. borderRadius: BorderRadius.circular(12),
  62. borderSide: const BorderSide(color: AppColors.primary, width: 2),
  63. ),
  64. contentPadding: const EdgeInsets.symmetric(horizontal: 16, vertical: 16),
  65. ),
  66. cardTheme: CardThemeData(
  67. elevation: 0,
  68. shape: RoundedRectangleBorder(
  69. borderRadius: BorderRadius.circular(16),
  70. side: BorderSide(color: Colors.grey[200]!),
  71. ),
  72. color: Colors.white,
  73. ),
  74. chipTheme: ChipThemeData(
  75. padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
  76. labelPadding: const EdgeInsets.symmetric(horizontal: 8),
  77. shape: RoundedRectangleBorder(
  78. borderRadius: BorderRadius.circular(24),
  79. ),
  80. ),
  81. );
  82. }
  83. static ThemeData get darkTheme {
  84. return ThemeData(
  85. useMaterial3: true,
  86. colorScheme: ColorScheme.fromSeed(
  87. seedColor: AppColors.primary,
  88. brightness: Brightness.dark,
  89. ),
  90. scaffoldBackgroundColor: const Color(0xFF121212),
  91. );
  92. }
  93. }