Line data Source code
1 : // Copyright 2023 The terCAD team. All rights reserved.
2 : // Use of this source code is governed by a CC BY-NC-ND 4.0 license that can be found in the LICENSE file.
3 :
4 : import 'package:app_finance/_configs/custom_color_scheme.dart';
5 : import 'package:material_ui/material_ui.dart';
6 : import 'package:google_fonts/google_fonts.dart';
7 :
8 : extension CustomTextTheme on TextTheme {
9 1 : TextTheme? withCustom(String paletteType, Brightness brightness) {
10 3 : final color = AppColors(paletteType, brightness).palette.secondary;
11 1 : return copyWith(
12 1 : titleLarge: GoogleFonts.abel(
13 : fontSize: 32,
14 : fontWeight: FontWeight.w400,
15 : color: color,
16 : ),
17 1 : titleMedium: GoogleFonts.abel(
18 : fontSize: 18,
19 : fontWeight: FontWeight.w400,
20 : color: color,
21 : ),
22 1 : titleSmall: GoogleFonts.abel(
23 : fontSize: 12,
24 : fontWeight: FontWeight.w400,
25 : color: color,
26 : ),
27 1 : headlineLarge: GoogleFonts.abel(
28 : fontSize: 32,
29 : fontWeight: FontWeight.w400,
30 : color: color,
31 : ),
32 1 : headlineMedium: GoogleFonts.abel(
33 : fontSize: 14,
34 : fontWeight: FontWeight.w600,
35 : color: color,
36 : ),
37 1 : headlineSmall: GoogleFonts.abel(
38 : fontSize: 12,
39 : fontWeight: FontWeight.w600,
40 : color: color,
41 : ),
42 1 : bodyLarge: GoogleFonts.abel(
43 : fontSize: 16,
44 : fontWeight: FontWeight.w600,
45 : color: color,
46 : ),
47 1 : bodyMedium: GoogleFonts.abel(
48 : fontSize: 14,
49 : fontWeight: FontWeight.w400,
50 : color: color,
51 : ),
52 1 : bodySmall: GoogleFonts.abel(
53 : fontSize: 10,
54 : fontWeight: FontWeight.w600,
55 : color: color,
56 : ),
57 1 : labelLarge: GoogleFonts.abel(
58 : fontSize: 12,
59 : fontWeight: FontWeight.w600,
60 : ),
61 1 : labelMedium: GoogleFonts.abel(
62 : fontSize: 10,
63 : fontWeight: FontWeight.w600,
64 : color: color,
65 : ),
66 1 : labelSmall: GoogleFonts.abel(
67 : fontSize: 8,
68 : fontWeight: FontWeight.w600,
69 : color: color,
70 : ),
71 : );
72 : }
73 :
74 2 : TextStyle get tooltipSmall => GoogleFonts.robotoCondensed(
75 : fontSize: 12,
76 : fontWeight: FontWeight.w400,
77 3 : color: titleLarge?.color?.withValues(alpha: 0.4),
78 : );
79 :
80 2 : TextStyle get tooltipMedium => GoogleFonts.robotoCondensed(
81 : fontSize: 16,
82 : fontWeight: FontWeight.w400,
83 3 : color: titleLarge?.color?.withValues(alpha: 0.4),
84 : );
85 :
86 2 : TextStyle get numberLarge => GoogleFonts.robotoCondensed(
87 : fontSize: 32,
88 : fontWeight: FontWeight.w400,
89 2 : color: titleLarge?.color,
90 : );
91 :
92 2 : TextStyle get numberMedium => GoogleFonts.robotoCondensed(
93 : fontSize: 16,
94 : fontWeight: FontWeight.w400,
95 2 : color: titleLarge?.color,
96 : );
97 :
98 2 : TextStyle get numberSmall => GoogleFonts.robotoCondensed(
99 : fontSize: 10,
100 : fontWeight: FontWeight.w400,
101 2 : color: titleLarge?.color,
102 : );
103 : }
|