@@ -7,18 +7,18 @@ import 'package:taskwarrior/app/modules/about/controllers/about_controller.dart'
7
7
import 'package:taskwarrior/app/utils/gen/assets.gen.dart' ;
8
8
import 'package:taskwarrior/app/utils/gen/fonts.gen.dart' ;
9
9
import 'package:taskwarrior/app/utils/language/sentence_manager.dart' ;
10
+ import 'package:taskwarrior/app/utils/themes/theme_extension.dart' ;
10
11
import 'package:url_launcher/url_launcher.dart' ;
11
12
12
- import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart' ;
13
13
import 'package:taskwarrior/app/utils/constants/taskwarrior_fonts.dart' ;
14
- import 'package:taskwarrior/app/utils/app_settings/app_settings.dart' ;
15
14
16
15
class AboutPageBody extends StatelessWidget {
17
16
final AboutController aboutController;
18
17
const AboutPageBody ({required this .aboutController, super .key});
19
18
20
19
@override
21
20
Widget build (BuildContext context) {
21
+ TaskwarriorColorTheme tColors = Theme .of (context).extension < TaskwarriorColorTheme > ()! ;
22
22
String introduction =
23
23
SentenceManager (currentLanguage: aboutController.selectedLanguage.value)
24
24
.sentences
@@ -51,9 +51,7 @@ class AboutPageBody extends StatelessWidget {
51
51
fontFamily: FontFamily .poppins,
52
52
fontWeight: TaskWarriorFonts .bold,
53
53
fontSize: TaskWarriorFonts .fontSizeExtraLarge,
54
- color: AppSettings .isDarkMode
55
- ? TaskWarriorColors .white
56
- : TaskWarriorColors .black,
54
+ color: tColors.primaryTextColor,
57
55
),
58
56
),
59
57
SizedBox (
@@ -84,19 +82,15 @@ class AboutPageBody extends StatelessWidget {
84
82
fontFamily: FontFamily .poppins,
85
83
fontWeight: TaskWarriorFonts .bold,
86
84
fontSize: TaskWarriorFonts .fontSizeMedium,
87
- color: AppSettings .isDarkMode
88
- ? TaskWarriorColors .white
89
- : TaskWarriorColors .black,
85
+ color: tColors.primaryTextColor,
90
86
),
91
87
),
92
88
TextSpan (
93
89
text: appInfoLines[1 ],
94
90
style: TextStyle (
95
91
fontFamily: FontFamily .poppins,
96
92
fontSize: TaskWarriorFonts .fontSizeMedium,
97
- color: AppSettings .isDarkMode
98
- ? TaskWarriorColors .white
99
- : TaskWarriorColors .black,
93
+ color: tColors.primaryTextColor,
100
94
),
101
95
),
102
96
],
@@ -116,9 +110,7 @@ class AboutPageBody extends StatelessWidget {
116
110
fontWeight: TaskWarriorFonts .bold,
117
111
fontSize:
118
112
TaskWarriorFonts .fontSizeMedium,
119
- color: AppSettings .isDarkMode
120
- ? TaskWarriorColors .white
121
- : TaskWarriorColors .black,
113
+ color: tColors.primaryTextColor,
122
114
),
123
115
),
124
116
TextSpan (
@@ -127,9 +119,7 @@ class AboutPageBody extends StatelessWidget {
127
119
fontFamily: FontFamily .poppins,
128
120
fontSize:
129
121
TaskWarriorFonts .fontSizeMedium,
130
- color: AppSettings .isDarkMode
131
- ? TaskWarriorColors .white
132
- : TaskWarriorColors .black,
122
+ color: tColors.primaryTextColor,
133
123
),
134
124
),
135
125
],
@@ -154,9 +144,7 @@ class AboutPageBody extends StatelessWidget {
154
144
fontFamily: FontFamily .poppins,
155
145
fontWeight: TaskWarriorFonts .medium,
156
146
fontSize: TaskWarriorFonts .fontSizeSmall,
157
- color: AppSettings .isDarkMode
158
- ? TaskWarriorColors .white
159
- : TaskWarriorColors .black,
147
+ color: tColors.primaryTextColor,
160
148
),
161
149
),
162
150
SizedBox (
@@ -170,9 +158,7 @@ class AboutPageBody extends StatelessWidget {
170
158
height: Get .height * 0.05 ,
171
159
child: ElevatedButton .icon (
172
160
style: ElevatedButton .styleFrom (
173
- backgroundColor: AppSettings .isDarkMode
174
- ? TaskWarriorColors .kLightSecondaryBackgroundColor
175
- : TaskWarriorColors .ksecondaryBackgroundColor,
161
+ backgroundColor: tColors.secondaryTextColor,
176
162
shape: RoundedRectangleBorder (
177
163
borderRadius: BorderRadius .circular (10 ),
178
164
),
@@ -190,19 +176,15 @@ class AboutPageBody extends StatelessWidget {
190
176
width: 20 ,
191
177
height: 20 ,
192
178
colorFilter: ColorFilter .mode (
193
- AppSettings .isDarkMode
194
- ? TaskWarriorColors .black
195
- : TaskWarriorColors .white,
179
+ tColors.secondaryBackgroundColor! ,
196
180
BlendMode .srcIn)),
197
181
label: Text (
198
182
"GitHub" ,
199
183
style: TextStyle (
200
184
fontFamily: FontFamily .poppins,
201
185
fontWeight: TaskWarriorFonts .medium,
202
186
fontSize: TaskWarriorFonts .fontSizeSmall,
203
- color: AppSettings .isDarkMode
204
- ? TaskWarriorColors .black
205
- : TaskWarriorColors .white,
187
+ color: tColors.secondaryBackgroundColor,
206
188
),
207
189
),
208
190
),
@@ -212,9 +194,7 @@ class AboutPageBody extends StatelessWidget {
212
194
height: Get .height * 0.05 ,
213
195
child: ElevatedButton .icon (
214
196
style: ElevatedButton .styleFrom (
215
- backgroundColor: AppSettings .isDarkMode
216
- ? TaskWarriorColors .kLightSecondaryBackgroundColor
217
- : TaskWarriorColors .ksecondaryBackgroundColor,
197
+ backgroundColor: tColors.secondaryTextColor,
218
198
shape: RoundedRectangleBorder (
219
199
borderRadius: BorderRadius .circular (10 ),
220
200
),
@@ -229,19 +209,17 @@ class AboutPageBody extends StatelessWidget {
229
209
width: 20 ,
230
210
height: 20 ,
231
211
colorFilter: ColorFilter .mode (
232
- AppSettings .isDarkMode
233
- ? TaskWarriorColors .black
234
- : TaskWarriorColors .white,
235
- BlendMode .srcIn) ),
212
+ tColors.secondaryBackgroundColor ! ,
213
+ BlendMode .srcIn
214
+ )
215
+ ),
236
216
label: Text (
237
217
"CCExtractor" ,
238
218
style: TextStyle (
239
219
fontFamily: FontFamily .poppins,
240
220
fontWeight: TaskWarriorFonts .medium,
241
221
fontSize: TaskWarriorFonts .fontSizeSmall,
242
- color: AppSettings .isDarkMode
243
- ? TaskWarriorColors .black
244
- : TaskWarriorColors .white,
222
+ color: tColors.secondaryBackgroundColor,
245
223
),
246
224
),
247
225
),
@@ -261,9 +239,7 @@ class AboutPageBody extends StatelessWidget {
261
239
fontFamily: FontFamily .poppins,
262
240
fontWeight: TaskWarriorFonts .semiBold,
263
241
fontSize: TaskWarriorFonts .fontSizeMedium,
264
- color: AppSettings .isDarkMode
265
- ? TaskWarriorColors .white
266
- : TaskWarriorColors .black,
242
+ color: tColors.primaryTextColor,
267
243
),
268
244
),
269
245
SizedBox (
0 commit comments