themes.dart 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. /// Copyright © 2014-2023 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 'colors.dart';
  9. const lightTextStyle = TextStyle(color: Color(0xFF43474D));
  10. const darkTextStyle = TextStyle(color: Colors.white);
  11. final comPDFKitLightTheme = ThemeData(
  12. splashColor: const Color(0x334982E6),
  13. highlightColor: const Color(0x334982E6),
  14. dividerColor: const Color(0x1A000000),
  15. scaffoldBackgroundColor: Colors.white,
  16. colorScheme: const ColorScheme.light(
  17. primary: Color(0xFF1460F3),
  18. onPrimary: Colors.black,
  19. primaryContainer: Color(0xFF1460F3),
  20. inversePrimary:Colors.white ,
  21. secondary: Color(0xFF1460F3),
  22. onSecondary: Colors.white,
  23. background: Colors.white,
  24. secondaryContainer: Color(0xFFF2F2F2),
  25. onBackground: Color(0xFF43474D)),
  26. tabBarTheme: const TabBarTheme(
  27. dividerColor: Color(0xFF1460F3),
  28. labelColor: Color(0xFF1460F3),
  29. unselectedLabelColor: Color(0xFF43474D),
  30. ),
  31. textTheme: TextTheme(
  32. titleMedium: lightTextStyle.copyWith(fontSize: 16),
  33. titleLarge: lightTextStyle.copyWith(fontSize: 22),
  34. titleSmall: lightTextStyle.copyWith(fontSize: 14),
  35. labelLarge: lightTextStyle.copyWith(fontSize: 14),
  36. labelMedium: lightTextStyle.copyWith(fontSize: 12),
  37. labelSmall: lightTextStyle.copyWith(fontSize: 11),
  38. bodyLarge: lightTextStyle.copyWith(fontSize: 16),
  39. bodyMedium: lightTextStyle.copyWith(fontSize: 14),
  40. bodySmall: lightTextStyle.copyWith(fontSize: 12)));
  41. final comPDFKitDarkTheme = ThemeData(
  42. highlightColor: const Color(0x334982E6),
  43. splashColor: const Color(0x334982E6),
  44. dividerColor: const Color(0x1AFFFFFF),
  45. scaffoldBackgroundColor: const Color(0xFF414347),
  46. colorScheme: const ColorScheme.dark(
  47. primary: Color(0xFF6499FF),
  48. onPrimary: Colors.white,
  49. primaryContainer: Color(0xFF6499FF),
  50. inversePrimary:Color(0xCC000000) ,
  51. secondary: Color(0xFF6499FF),
  52. onSecondary: Color(0xFF606773),
  53. background: Color(0xFF414347),
  54. secondaryContainer: Color(0xFF303238),
  55. ),
  56. tabBarTheme: const TabBarTheme(
  57. dividerColor: Color(0xFF6499FF),
  58. labelColor: Color(0xFF6499FF),
  59. unselectedLabelColor: Colors.white,
  60. ),
  61. textTheme: TextTheme(
  62. titleMedium: darkTextStyle.copyWith(fontSize: 16),
  63. titleLarge: darkTextStyle.copyWith(fontSize: 22),
  64. titleSmall: darkTextStyle.copyWith(fontSize: 14),
  65. labelLarge: darkTextStyle.copyWith(fontSize: 14),
  66. labelMedium: darkTextStyle.copyWith(fontSize: 12),
  67. labelSmall: darkTextStyle.copyWith(fontSize: 11),
  68. bodyLarge: darkTextStyle.copyWith(fontSize: 16),
  69. bodyMedium: darkTextStyle.copyWith(fontSize: 14),
  70. bodySmall: darkTextStyle.copyWith(fontSize: 12)));
  71. InputDecoration textFieldStyle(BuildContext context) {
  72. return InputDecoration(
  73. hintStyle: const TextStyle(fontSize: 14, color: CPDFColors.hintColor),
  74. focusColor: Theme.of(context).colorScheme.primaryContainer,
  75. contentPadding: const EdgeInsets.all(2),
  76. focusedBorder: UnderlineInputBorder(
  77. borderSide: BorderSide(
  78. color: Theme.of(context).colorScheme.primaryContainer,
  79. width: 1.5)));
  80. }