dev
dart 54 lines 1.12 KB
Raw
1 import 'package:flutter/material.dart';
2 import 'package:cake_wallet/themes/core/custom_theme_colors.dart';
3
4 enum ThemeType { light, dark }
5
6 abstract interface class ThemeAccentColor {
7 Color get color;
8 String get name;
9 }
10
11 /// Abstract base class for theme data in the app.
12 /// This class defines the contract that all theme implementations must follow.
13 abstract class MaterialThemeBase {
14 int get raw;
15
16 String get title;
17
18 ThemeMode get themeMode;
19
20 ThemeType get type;
21
22 Color get errorColor;
23
24 Color get surfaceColor;
25
26 Color get primaryColor;
27
28 Color get secondaryColor;
29
30 Brightness get brightness;
31
32 ColorScheme get colorScheme;
33
34 Color get tertiaryColor;
35
36 TextTheme get textTheme;
37
38 ThemeData get themeData;
39
40 bool get isDark => brightness == Brightness.dark;
41
42 /// Custom colors provider for theme-specific colors
43 CustomThemeColors get customColors;
44
45 /// Theme family identifier for grouping themes with accent colors
46 String? get themeFamily;
47
48 String? get accentColorId;
49
50 String? get accentColorName;
51
52 /// Whether this theme has accent color variants
53 bool get hasAccentColors => themeFamily != null;
54 }