themes.dart 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. // Copyright © 2014-2024 PDF Technologies, Inc. All Rights Reserved.
  2. //
  3. // THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
  4. // AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT.
  5. // UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
  6. // This notice may not be removed from this file.
  7. import 'package:flutter/material.dart';
  8. import 'package:flutter/services.dart';
  9. final ThemeData lightTheme = ThemeData(
  10. useMaterial3: true,
  11. brightness: Brightness.light,
  12. colorScheme: const ColorScheme.light(
  13. primary: Colors.blue,
  14. onPrimary: Color(0xFF43474D),
  15. onSecondary: Color(0xFF666666)),
  16. textTheme: const TextTheme(
  17. bodyMedium: TextStyle(),
  18. bodyLarge: TextStyle(),
  19. bodySmall: TextStyle(),
  20. titleMedium: TextStyle())
  21. .apply(
  22. displayColor: const Color(0xFF43474D),
  23. bodyColor: const Color(0xFF43474D)),
  24. appBarTheme: const AppBarTheme(
  25. elevation: 4.0,
  26. titleTextStyle: TextStyle(
  27. fontSize: 18,
  28. fontWeight: FontWeight.bold,
  29. color: Color(0xFF43474D)),
  30. backgroundColor: Color(0xFFFAFCFF),
  31. foregroundColor: Color(0xFF43474D),
  32. systemOverlayStyle:
  33. SystemUiOverlayStyle(systemNavigationBarColor: Color(0xFFFFFFFF))),
  34. elevatedButtonTheme: ElevatedButtonThemeData(
  35. style: ElevatedButton.styleFrom(foregroundColor: Colors.blue)),
  36. switchTheme: SwitchThemeData(
  37. thumbColor: WidgetStateProperty.resolveWith((status){
  38. if(status.contains(WidgetState.selected)) {
  39. return Colors.blue;
  40. }
  41. return Colors.grey.shade400;
  42. } ),
  43. trackColor: WidgetStateProperty.resolveWith((status){
  44. if(status.contains(WidgetState.selected)) {
  45. return Colors.blue.shade50;
  46. }
  47. return Colors.grey.shade100;
  48. }),
  49. trackOutlineColor: WidgetStateProperty.resolveWith((status){
  50. if(status.contains(WidgetState.selected)) {
  51. return Colors.blue.shade50;
  52. }
  53. return Colors.grey.shade100;
  54. }),
  55. ));
  56. final ThemeData darkTheme = ThemeData(
  57. useMaterial3: true,
  58. brightness: Brightness.dark,
  59. scaffoldBackgroundColor: Colors.black,
  60. colorScheme: const ColorScheme.dark(
  61. primary: Color(0xFF222429),
  62. surface: Color(0xFF222429),
  63. onPrimary: Colors.white,
  64. onSecondary: Colors.white),
  65. textTheme: const TextTheme(
  66. bodyMedium: TextStyle(),
  67. bodyLarge: TextStyle(),
  68. bodySmall: TextStyle(),
  69. titleMedium: TextStyle())
  70. .apply(displayColor: Colors.white, bodyColor: Colors.white),
  71. appBarTheme: const AppBarTheme(
  72. elevation: 2.0,
  73. titleTextStyle: TextStyle(
  74. fontSize: 18, fontWeight: FontWeight.bold, color: Colors.white),
  75. backgroundColor: Color(0xFF222429),
  76. foregroundColor: Colors.white,
  77. systemOverlayStyle:
  78. SystemUiOverlayStyle(systemNavigationBarColor: Color(0xFF222429))),
  79. elevatedButtonTheme: ElevatedButtonThemeData(
  80. style: ElevatedButton.styleFrom(foregroundColor: Colors.blue)));