themes.dart 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. import 'package:flutter/material.dart';
  2. import 'package:flutter/services.dart';
  3. class AppTheme {
  4. // Colores base
  5. static Color primary = const Color(0xFF32D7ED);
  6. static Color secondary = Colors.black;
  7. static Color tertiary = const Color(0xFF242424);
  8. static Color quaternary = const Color(0xFFF1F1F3);
  9. static Color verde = const Color(0xff248f83);
  10. static Color rojo = const Color(0xFFF24B59);
  11. // Tema Claro
  12. static ThemeData lightTheme = ThemeData.light().copyWith(
  13. scaffoldBackgroundColor: const Color(0xFFE0E0E0),
  14. appBarTheme: AppBarTheme(
  15. color: primary,
  16. foregroundColor: secondary,
  17. systemOverlayStyle: SystemUiOverlayStyle(
  18. statusBarColor: primary,
  19. statusBarIconBrightness: Brightness.dark,
  20. ),
  21. iconTheme: IconThemeData(color: secondary),
  22. ),
  23. floatingActionButtonTheme: FloatingActionButtonThemeData(
  24. backgroundColor: primary,
  25. foregroundColor: secondary,
  26. ),
  27. progressIndicatorTheme: ProgressIndicatorThemeData(color: tertiary),
  28. datePickerTheme: DatePickerThemeData(
  29. backgroundColor: const Color(0xFFDBDBDB),
  30. headerBackgroundColor: primary,
  31. todayBackgroundColor: const MaterialStatePropertyAll(Color(0xFFDBDBDB)),
  32. todayForegroundColor: const MaterialStatePropertyAll(Colors.black),
  33. rangePickerBackgroundColor: secondary,
  34. ),
  35. );
  36. // **Tema Oscuro**
  37. static ThemeData darkTheme = ThemeData.dark().copyWith(
  38. scaffoldBackgroundColor: const Color(0xFF121212),
  39. appBarTheme: AppBarTheme(
  40. color: tertiary, // Un gris oscuro
  41. foregroundColor: Colors.white,
  42. systemOverlayStyle: SystemUiOverlayStyle(
  43. statusBarColor: tertiary,
  44. statusBarIconBrightness: Brightness.light,
  45. ),
  46. iconTheme: const IconThemeData(color: Colors.white),
  47. ),
  48. floatingActionButtonTheme: FloatingActionButtonThemeData(
  49. backgroundColor: primary,
  50. foregroundColor: Colors.black,
  51. ),
  52. progressIndicatorTheme: ProgressIndicatorThemeData(color: primary),
  53. datePickerTheme: DatePickerThemeData(
  54. backgroundColor: tertiary,
  55. headerBackgroundColor: primary,
  56. todayBackgroundColor: const MaterialStatePropertyAll(Colors.white24),
  57. todayForegroundColor: const MaterialStatePropertyAll(Colors.white),
  58. rangePickerBackgroundColor: secondary,
  59. ),
  60. );
  61. }