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.

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