dev
dart 247 lines 7.58 KB
Raw
1 import 'package:flutter/material.dart';
2 import 'package:cake_wallet/themes/core/material_base_theme.dart';
3 import 'package:cake_wallet/themes/core/custom_theme_colors.dart';
4 import 'package:cake_wallet/themes/custom_theme_colors/light_theme_custom_colors.dart';
5
6 class LightTheme extends MaterialThemeBase {
7 @override
8 Brightness get brightness => Brightness.light;
9
10 @override
11 ThemeMode get themeMode => ThemeMode.light;
12
13 @override
14 Color get primaryColor => const Color(0xFF4EBEFF);
15
16 @override
17 Color get secondaryColor => const Color(0xFF625C64);
18
19 @override
20 Color get tertiaryColor => const Color(0xFFBFCBDE);
21
22 @override
23 Color get errorColor => const Color(0xFFBA1A1A);
24
25 @override
26 Color get surfaceColor => const Color(0xFFEFEFF8);
27
28 @override
29 ColorScheme get colorScheme => ColorScheme.light(
30 primary: primaryColor,
31 onPrimary: const Color(0xFFFFFFFF),
32 primaryContainer: const Color(0xFF403747),
33 onPrimaryContainer: const Color(0xFFD5C8DC),
34 secondary: secondaryColor,
35 onSecondary: const Color(0xFFFFFFFF),
36 secondaryContainer: const Color(0xFFE1E4EA),
37 onSecondaryContainer: const Color(0xFF4C474E),
38 tertiary: tertiaryColor,
39 onTertiary: const Color(0xFFFFFFFF),
40 tertiaryContainer: const Color(0xFF35404A),
41 onTertiaryContainer: const Color(0xFFC5D7E5),
42 error: errorColor,
43 onError: const Color(0xFFFFFFFF),
44 errorContainer: const Color(0xFFFFBDBD),
45 onErrorContainer: const Color(0xFFE43D3D),
46 surface: surfaceColor,
47 surfaceDim: const Color(0xFFE7E7FD),
48 onSurface: const Color(0xFF312938),
49 onSurfaceVariant: const Color(0xFF6C6772),
50 surfaceContainerLowest: Color(0xFFE4E4E4),
51 surfaceContainerLow: Color(0xFFECECED),
52 surfaceContainer: Color(0xFFFBFBFD),
53 surfaceContainerHigh: Color(0xFFFDFDFE),
54 surfaceContainerHighest: Color(0xFFFFFFFF),
55 onInverseSurface: Color(0xFFFAFAFA),
56 outline: const Color(0xFF7B757C),
57 outlineVariant: const Color(0xFFEDEDF6),
58 );
59
60 @override
61 TextTheme get textTheme => TextTheme(
62 displayLarge: TextStyle(
63 fontSize: 57,
64 fontWeight: FontWeight.w400,
65 letterSpacing: -0.25,
66 color: colorScheme.onSurface,
67 ),
68 displayMedium: TextStyle(
69 fontSize: 45,
70 fontWeight: FontWeight.w400,
71 letterSpacing: 0,
72 color: colorScheme.onSurface,
73 ),
74 displaySmall: TextStyle(
75 fontSize: 36,
76 fontWeight: FontWeight.w400,
77 letterSpacing: 0,
78 color: colorScheme.onSurface,
79 ),
80 headlineLarge: TextStyle(
81 fontSize: 22,
82 fontWeight: FontWeight.w600,
83 letterSpacing: 0,
84 color: colorScheme.onSurface,
85 ),
86 headlineMedium: TextStyle(
87 fontSize: 18,
88 fontWeight: FontWeight.w600,
89 letterSpacing: 0,
90 color: colorScheme.onSurface,
91 ),
92 headlineSmall: TextStyle(
93 fontSize: 14,
94 fontWeight: FontWeight.w600,
95 letterSpacing: 0,
96 color: colorScheme.onSurface,
97 ),
98 titleLarge: TextStyle(
99 fontSize: 22,
100 fontWeight: FontWeight.w500,
101 letterSpacing: 0,
102 color: colorScheme.onSurface,
103 ),
104 titleMedium: TextStyle(
105 fontSize: 16,
106 fontWeight: FontWeight.w500,
107 letterSpacing: 0.15,
108 color: colorScheme.onSurface,
109 ),
110 titleSmall: TextStyle(
111 fontSize: 14,
112 fontWeight: FontWeight.w500,
113 letterSpacing: 0.1,
114 color: colorScheme.onSurface,
115 ),
116 bodyLarge: TextStyle(
117 fontSize: 16,
118 fontWeight: FontWeight.w400,
119 letterSpacing: 0.5,
120 color: colorScheme.onSurface,
121 ),
122 bodyMedium: TextStyle(
123 fontSize: 14,
124 fontWeight: FontWeight.w400,
125 letterSpacing: 0.25,
126 color: colorScheme.onSurface,
127 ),
128 bodySmall: TextStyle(
129 fontSize: 12,
130 fontWeight: FontWeight.w400,
131 letterSpacing: 0.4,
132 color: colorScheme.onSurface,
133 ),
134 labelLarge: TextStyle(
135 fontSize: 14,
136 fontWeight: FontWeight.w500,
137 letterSpacing: 0.1,
138 color: colorScheme.onSurface,
139 ),
140 labelMedium: TextStyle(
141 fontSize: 12,
142 fontWeight: FontWeight.w500,
143 letterSpacing: 0.5,
144 color: colorScheme.onSurface,
145 ),
146 labelSmall: TextStyle(
147 fontSize: 11,
148 fontWeight: FontWeight.w500,
149 letterSpacing: 0.5,
150 color: colorScheme.onSurface,
151 ),
152 );
153
154 static const String fontFamily = 'Wix Madefor Text';
155 @override
156 ThemeData get themeData => ThemeData(
157 useMaterial3: true,
158 brightness: brightness,
159 colorScheme: colorScheme,
160 fontFamily: fontFamily,
161 textTheme: textTheme,
162 appBarTheme: AppBarTheme(
163 backgroundColor: colorScheme.surface,
164 foregroundColor: colorScheme.onSurface,
165 elevation: 0,
166 ),
167 cardTheme: CardThemeData(
168 color: colorScheme.surface,
169 elevation: 1,
170 shape: RoundedRectangleBorder(
171 borderRadius: BorderRadius.circular(12),
172 ),
173 ),
174 elevatedButtonTheme: ElevatedButtonThemeData(
175 style: ElevatedButton.styleFrom(
176 backgroundColor: colorScheme.primary,
177 foregroundColor: colorScheme.onPrimary,
178 elevation: 0,
179 shape: RoundedRectangleBorder(
180 borderRadius: BorderRadius.circular(18),
181 ),
182 ),
183 ),
184 outlinedButtonTheme: OutlinedButtonThemeData(
185 style: OutlinedButton.styleFrom(
186 foregroundColor: colorScheme.primary,
187 side: BorderSide(color: colorScheme.outline),
188 shape: RoundedRectangleBorder(
189 borderRadius: BorderRadius.circular(18),
190 ),
191 ),
192 ),
193 textButtonTheme: TextButtonThemeData(
194 style: TextButton.styleFrom(
195 foregroundColor: colorScheme.primary,
196 shape: RoundedRectangleBorder(
197 borderRadius: BorderRadius.circular(18),
198 ),
199 ),
200 ),
201 inputDecorationTheme: InputDecorationTheme(
202 filled: true,
203 fillColor: colorScheme.surfaceContainer,
204 border: OutlineInputBorder(
205 borderRadius: BorderRadius.circular(18),
206 borderSide: BorderSide.none,
207 ),
208 enabledBorder: OutlineInputBorder(
209 borderRadius: BorderRadius.circular(18),
210 borderSide: BorderSide.none,
211 ),
212 focusedBorder: OutlineInputBorder(
213 borderRadius: BorderRadius.circular(18),
214 borderSide: BorderSide(color: colorScheme.primary),
215 ),
216 errorBorder: OutlineInputBorder(
217 borderRadius: BorderRadius.circular(18),
218 borderSide: BorderSide(color: colorScheme.error),
219 ),
220 focusedErrorBorder: OutlineInputBorder(
221 borderRadius: BorderRadius.circular(18),
222 borderSide: BorderSide(color: colorScheme.error),
223 ),
224 ),
225 );
226
227 @override
228 String get title => 'Light Theme';
229
230 @override
231 ThemeType get type => ThemeType.light;
232
233 @override
234 int get raw => 0;
235
236 @override
237 CustomThemeColors get customColors => LightThemeCustomColors();
238
239 @override
240 String? get themeFamily => null;
241
242 @override
243 String? get accentColorId => null;
244
245 @override
246 String? get accentColorName => null;
247 }