Skip to content

Commit ac3fa27

Browse files
create GetTextStyle
1 parent 3ba5b21 commit ac3fa27

File tree

1 file changed

+83
-0
lines changed

1 file changed

+83
-0
lines changed
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
import 'package:algorithm_visualizer/core/resources/font_manager.dart';
2+
import 'package:flutter/material.dart';
3+
import 'package:algorithm_visualizer/core/resources/color_manager.dart';
4+
5+
class GetTextStyle extends TextStyle {
6+
const GetTextStyle({
7+
required double fontSize,
8+
super.height,
9+
required super.fontWeight,
10+
super.color,
11+
required FontStyle super.fontStyle,
12+
required TextDecoration super.decoration,
13+
super.decorationThickness,
14+
super.letterSpacing = 0,
15+
super.shadows,
16+
super.wordSpacing = 1,
17+
}) : super(fontSize: fontSize, fontFamily: FontConstants.fontFamily);
18+
}
19+
20+
class GetLightStyle extends GetTextStyle {
21+
const GetLightStyle({
22+
super.fontSize = 16,
23+
super.height,
24+
super.color = ColorManager.black,
25+
super.fontStyle = FontStyle.normal,
26+
super.decoration = TextDecoration.none,
27+
super.decorationThickness,
28+
super.letterSpacing,
29+
super.shadows,
30+
}) : super(fontWeight: FontWeightManager.light);
31+
}
32+
33+
class GetRegularStyle extends GetTextStyle {
34+
const GetRegularStyle({
35+
super.fontSize = 16,
36+
super.height,
37+
super.color = ColorManager.black,
38+
super.fontStyle = FontStyle.normal,
39+
super.decoration = TextDecoration.none,
40+
super.decorationThickness,
41+
super.letterSpacing,
42+
super.shadows,
43+
}) : super(fontWeight: FontWeightManager.regular);
44+
}
45+
46+
class GetMediumStyle extends GetTextStyle {
47+
const GetMediumStyle({
48+
super.fontSize = 16,
49+
super.height,
50+
super.color = ColorManager.black,
51+
super.fontStyle = FontStyle.normal,
52+
super.decoration = TextDecoration.none,
53+
super.decorationThickness,
54+
super.letterSpacing,
55+
super.shadows,
56+
}) : super(fontWeight: FontWeightManager.medium);
57+
}
58+
59+
class GetSemiBoldStyle extends GetTextStyle {
60+
const GetSemiBoldStyle({
61+
super.fontSize = 16,
62+
super.height,
63+
super.color = ColorManager.black,
64+
super.fontStyle = FontStyle.normal,
65+
super.decoration = TextDecoration.none,
66+
super.decorationThickness,
67+
super.letterSpacing,
68+
super.shadows,
69+
}) : super(fontWeight: FontWeightManager.semiBold);
70+
}
71+
72+
class GetBoldStyle extends GetTextStyle {
73+
const GetBoldStyle({
74+
super.fontSize = 16,
75+
super.height,
76+
super.color = ColorManager.black,
77+
super.fontStyle = FontStyle.normal,
78+
super.decoration = TextDecoration.none,
79+
super.decorationThickness,
80+
super.letterSpacing,
81+
super.shadows,
82+
}) : super(fontWeight: FontWeightManager.bold);
83+
}

0 commit comments

Comments
 (0)