Skip to content

Commit d28df98

Browse files
committed
added settings page and changed the fonts
1 parent deef4c1 commit d28df98

30 files changed

+369
-262
lines changed

android/app/src/main/res/layout/taskwarrior_layout.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
android:layout_height="wrap_content"
1919
android:text="TaskWarrior"
2020
android:textSize="20sp"
21-
android:textStyle="bold"
21+
android:GoogleFonts.poppins="bold"
2222
android:layout_alignParentTop="true"
2323
android:layout_centerHorizontal="true"
2424
android:layout_marginTop="12dp"/>
@@ -30,7 +30,7 @@
3030
android:layout_height="wrap_content"
3131
android:text="Pending Tasks"
3232
android:textSize="18sp"
33-
android:textStyle="bold"
33+
android:GoogleFonts.poppins="bold"
3434
android:layout_below="@id/taskWarriorText"
3535
android:layout_centerHorizontal="true"
3636
android:layout_marginTop="8dp"/>
@@ -52,7 +52,7 @@
5252
android:layout_height="wrap_content"
5353
android:text="Title"
5454
android:textSize="16sp"
55-
android:textStyle="bold" />
55+
android:GoogleFonts.poppins="bold" />
5656

5757
<TextView
5858
android:id="@+id/idTvDate"
@@ -82,7 +82,7 @@
8282
android:layout_height="wrap_content"
8383
android:text="Title"
8484
android:textSize="16sp"
85-
android:textStyle="bold" />
85+
android:GoogleFonts.poppins="bold" />
8686

8787
<TextView
8888
android:id="@+id/idTvDate2"
@@ -113,7 +113,7 @@
113113
android:layout_height="wrap_content"
114114
android:text="Title"
115115
android:textSize="16sp"
116-
android:textStyle="bold" />
116+
android:GoogleFonts.poppins="bold" />
117117

118118
<TextView
119119
android:id="@+id/idTvDate3"

lib/drawer/filter_drawer.dart

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class FilterDrawer extends StatelessWidget {
4141
padding: const EdgeInsets.symmetric(horizontal: 0.0),
4242
child: Text(
4343
'Apply Filters',
44-
style: TextStyle(
44+
style: GoogleFonts.poppins(
4545
fontWeight: FontWeight.bold,
4646
color: (AppSettings.isDarkMode
4747
? Colors.white
@@ -68,7 +68,7 @@ class FilterDrawer extends StatelessWidget {
6868
children: <TextSpan>[
6969
TextSpan(
7070
text: 'Status : ',
71-
style: GoogleFonts.firaMono(
71+
style: GoogleFonts.poppins(
7272
fontWeight: FontWeight.bold,
7373
fontSize: 15,
7474
color: AppSettings.isDarkMode
@@ -78,7 +78,7 @@ class FilterDrawer extends StatelessWidget {
7878
),
7979
TextSpan(
8080
text: filters.pendingFilter ? 'pending' : 'completed',
81-
style: GoogleFonts.firaMono(
81+
style: GoogleFonts.poppins(
8282
fontSize: 15,
8383
color: AppSettings.isDarkMode
8484
? Colors.white
@@ -132,11 +132,11 @@ class FilterDrawer extends StatelessWidget {
132132
padding: const EdgeInsets.symmetric(horizontal: 0.0),
133133
child: Text(
134134
'Filter Tag By:',
135-
style: TextStyle(
135+
style: GoogleFonts.poppins(
136136
color: (AppSettings.isDarkMode
137137
? Colors.white
138138
: Color.fromARGB(255, 48, 46, 46)),
139-
fontFamily: GoogleFonts.firaMono().fontFamily,
139+
//
140140
fontSize: 18),
141141
//textAlign: TextAlign.right,
142142
),
@@ -175,11 +175,10 @@ class FilterDrawer extends StatelessWidget {
175175
padding: const EdgeInsets.symmetric(horizontal: 0.0),
176176
child: Text(
177177
'Sort By',
178-
style: TextStyle(
178+
style: GoogleFonts.poppins(
179179
color: (AppSettings.isDarkMode
180180
? Colors.white
181181
: Color.fromARGB(255, 48, 46, 46)),
182-
fontFamily: GoogleFonts.firaMono().fontFamily,
183182
fontSize: 18),
184183
//textAlign: TextAlign.right,
185184
),
@@ -221,7 +220,7 @@ class FilterDrawer extends StatelessWidget {
221220
storageWidget.selectSort('$sort+');
222221
}
223222
},
224-
labelStyle: TextStyle(
223+
labelStyle: GoogleFonts.poppins(
225224
color: AppSettings.isDarkMode
226225
? Colors.black
227226
: Colors.white),
@@ -254,7 +253,7 @@ class FilterDrawer extends StatelessWidget {
254253
},
255254
child: Text(
256255
'Reset Sort',
257-
style: TextStyle(
256+
style: GoogleFonts.poppins(
258257
fontSize: 15,
259258
color: AppSettings.isDarkMode
260259
? Color.fromARGB(255, 48, 46, 46)
@@ -312,13 +311,13 @@ class FilterDrawer extends StatelessWidget {
312311
// FilterChip(
313312
// onSelected: (_) => filters.toggleTagUnion(),
314313
// label: Text(filters.tagUnion ? 'OR' : 'AND',
315-
// style: GoogleFonts.firaMono())),
314+
// style: GoogleFonts.poppins())),
316315
// for (var entry in filters.tags.entries)
317316
// FilterChip(
318317
// onSelected: (_) => filters.toggleTagFilter(entry.key),
319318
// label: Text(
320319
// entry.value.display,
321-
// style: GoogleFonts.firaMono(
320+
// style: GoogleFonts.poppins(
322321
// fontWeight: entry.value.selected ? FontWeight.w700 : null,
323322
// ),
324323
// ),

lib/drawer/nav_drawer.dart

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
import 'package:flutter/material.dart';
2+
import 'package:google_fonts/google_fonts.dart';
23

34
import 'package:taskwarrior/config/app_settings.dart';
45
import 'package:taskwarrior/model/storage/storage_widget.dart';
56
import 'package:taskwarrior/routes/pageroute.dart';
67
import 'package:taskwarrior/views/about/about.dart';
78
import 'package:taskwarrior/views/reports/reports_home.dart';
9+
import 'package:taskwarrior/views/settings/settings.dart';
810

911
class NavDrawer extends StatefulWidget {
1012
final InheritedStorage storageWidget;
@@ -33,9 +35,9 @@ class _NavDrawerState extends State<NavDrawer> {
3335
tileColor: AppSettings.isDarkMode ? Colors.black : Colors.white,
3436
textColor: AppSettings.isDarkMode ? Colors.white : Colors.black,
3537
contentPadding: const EdgeInsets.only(top: 40, left: 10),
36-
title: const Text(
38+
title: Text(
3739
'Menu',
38-
style: TextStyle(
40+
style: GoogleFonts.poppins(
3941
fontSize: 25,
4042
fontWeight: FontWeight.bold,
4143
),
@@ -120,6 +122,19 @@ class _NavDrawerState extends State<NavDrawer> {
120122
},
121123
title: const Text("About"),
122124
),
125+
ListTile(
126+
tileColor: AppSettings.isDarkMode ? Colors.black : Colors.white,
127+
textColor: AppSettings.isDarkMode ? Colors.white : Colors.black,
128+
leading: Icon(
129+
Icons.settings,
130+
color: AppSettings.isDarkMode ? Colors.white : Colors.black,
131+
),
132+
onTap: () {
133+
Navigator.of(context).push(MaterialPageRoute(
134+
builder: (context) => const SettingsPage()));
135+
},
136+
title: const Text("Settings"),
137+
),
123138
],
124139
));
125140
}

lib/model/storage/storage_widget.dart

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import 'dart:io';
55

66
import 'package:connectivity_plus/connectivity_plus.dart';
77
import 'package:flutter/material.dart';
8+
import 'package:get/get.dart';
9+
import 'package:google_fonts/google_fonts.dart';
810

911
import 'package:loggy/loggy.dart';
1012

@@ -267,20 +269,26 @@ class _StorageWidgetState extends State<StorageWidget> {
267269
),
268270
child: Container(
269271
padding: const EdgeInsets.all(16.0),
270-
child: const Column(
272+
child: Column(
271273
mainAxisSize: MainAxisSize.min,
272274
children: [
273-
CircularProgressIndicator(),
274-
SizedBox(height: 16.0),
275+
const CircularProgressIndicator(),
276+
const SizedBox(height: 16.0),
275277
Text(
276278
"Syncing",
277-
style: TextStyle(
279+
style: GoogleFonts.poppins(
278280
fontSize: 18.0,
279281
fontWeight: FontWeight.bold,
280282
),
281283
),
282-
SizedBox(height: 8.0),
283-
Text("Please wait..."),
284+
const SizedBox(height: 8.0),
285+
Text(
286+
"Please wait...",
287+
style: GoogleFonts.poppins(
288+
fontSize: 12.0,
289+
fontWeight: FontWeight.normal,
290+
),
291+
),
284292
],
285293
),
286294
),
@@ -296,7 +304,7 @@ class _StorageWidgetState extends State<StorageWidget> {
296304
setState(() {});
297305

298306
if (isDialogNeeded) {
299-
Navigator.pop(context);
307+
Get.back();
300308
}
301309

302310
ScaffoldMessenger.of(context).showSnackBar(
@@ -306,6 +314,9 @@ class _StorageWidgetState extends State<StorageWidget> {
306314
);
307315
}
308316
} catch (e, trace) {
317+
if (isDialogNeeded) {
318+
Get.back();
319+
}
309320
logError(e, trace);
310321
}
311322
}

lib/services/task_details.dart

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class _DetailRouteState extends State<DetailRoute> {
7070
backgroundColor: Palette.kToDark,
7171
title: Text(
7272
'id: ${(modify.id == 0) ? '-' : modify.id}',
73-
style: GoogleFonts.firaMono(color: Colors.white),
73+
style: GoogleFonts.poppins(color: Colors.white),
7474
),
7575
),
7676
body: Padding(
@@ -124,7 +124,7 @@ class _DetailRouteState extends State<DetailRoute> {
124124
' new: ${entry.value['new']}')
125125
.toList()
126126
.join('\n'),
127-
style: GoogleFonts.firaMono(),
127+
style: GoogleFonts.poppins(),
128128
),
129129
),
130130
actions: [
@@ -291,7 +291,7 @@ class AttributeWidget extends StatelessWidget {
291291
children: [
292292
Text(
293293
'$name:'.padRight(13),
294-
style: GoogleFonts.firaMono(
294+
style: GoogleFonts.poppins(
295295
fontWeight: FontWeight.bold,
296296
fontSize: 15,
297297
color:
@@ -300,7 +300,7 @@ class AttributeWidget extends StatelessWidget {
300300
),
301301
Text(
302302
localValue?.toString() ?? "not selected",
303-
style: GoogleFonts.firaMono(
303+
style: GoogleFonts.poppins(
304304
fontSize: 15,
305305
color:
306306
AppSettings.isDarkMode ? Colors.white : Colors.black,
@@ -345,7 +345,7 @@ class TagsWidget extends StatelessWidget {
345345
children: <TextSpan>[
346346
TextSpan(
347347
text: '$name:'.padRight(13),
348-
style: GoogleFonts.firaMono(
348+
style: GoogleFonts.poppins(
349349
fontWeight: FontWeight.bold,
350350
fontSize: 15,
351351
color: AppSettings.isDarkMode
@@ -356,7 +356,7 @@ class TagsWidget extends StatelessWidget {
356356
TextSpan(
357357
text:
358358
'${(value as ListBuilder?)?.build() ?? 'not selected'}',
359-
style: GoogleFonts.firaMono(
359+
style: GoogleFonts.poppins(
360360
fontSize: 15,
361361
color: AppSettings.isDarkMode
362362
? Colors.white
@@ -368,7 +368,7 @@ class TagsWidget extends StatelessWidget {
368368
),
369369
// Text(
370370
// '${'$name: '}${(value as ListBuilder?)?.build()}',
371-
// style: GoogleFonts.firaMono(),
371+
// style: GoogleFonts.poppins(),
372372
// ),
373373
],
374374
),
@@ -410,7 +410,7 @@ class TagsWidget extends StatelessWidget {
410410
// (value == null)
411411
// ? '${'$name:'.padRight(13)}null'
412412
// : '${'$name:'.padRight(13)}${(value as ListBuilder).length} annotation(s)',
413-
// style: GoogleFonts.firaMono(),
413+
// style: GoogleFonts.poppins(),
414414
// ),
415415
// ],
416416
// ),

0 commit comments

Comments
 (0)