Skip to content

Commit fccd097

Browse files
committed
temperory UI working
1 parent f0a378d commit fccd097

File tree

3 files changed

+41
-26
lines changed

3 files changed

+41
-26
lines changed

lib/drawer/filter_drawer.dart

Lines changed: 39 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -141,20 +141,14 @@ class _FilterDrawerState extends State<FilterDrawer> {
141141
style: GoogleFonts.poppins(
142142
fontWeight: TaskWarriorFonts.bold,
143143
fontSize: TaskWarriorFonts.fontSizeMedium,
144-
color: AppSettings.isDarkMode
145-
? TaskWarriorColors.white
146-
: TaskWarriorColors.black,
144+
color: AppSettings.isDarkMode ? TaskWarriorColors.white : TaskWarriorColors.black,
147145
),
148146
),
149147
TextSpan(
150-
text: widget.filters.pendingFilter
151-
? 'pending'
152-
: 'completed',
148+
text: widget.filters.pendingFilter ? 'pending' : 'completed',
153149
style: GoogleFonts.poppins(
154150
fontSize: TaskWarriorFonts.fontSizeMedium,
155-
color: AppSettings.isDarkMode
156-
? TaskWarriorColors.white
157-
: TaskWarriorColors.black,
151+
color: AppSettings.isDarkMode ? TaskWarriorColors.white : TaskWarriorColors.black,
158152
),
159153
),
160154
],
@@ -169,6 +163,32 @@ class _FilterDrawerState extends State<FilterDrawer> {
169163
const Divider(
170164
color: Color.fromARGB(0, 48, 46, 46),
171165
),
166+
const Divider(
167+
color: Color.fromARGB(0, 48, 46, 46),
168+
),
169+
Container(
170+
decoration: BoxDecoration(
171+
color: tileColor,
172+
borderRadius: BorderRadius.circular(8),
173+
border: Border.all(color: TaskWarriorColors.borderColor),
174+
),
175+
child: GestureDetector(
176+
onTap:
177+
widget.filters.toggleWaitingFilter,
178+
child: Text(
179+
'Waiting',
180+
style: GoogleFonts.poppins(
181+
color: (AppSettings.isDarkMode
182+
? TaskWarriorColors.kprimaryTextColor
183+
: TaskWarriorColors.kLightSecondaryTextColor),
184+
//
185+
fontSize: TaskWarriorFonts.fontSizeLarge),
186+
),
187+
),
188+
),
189+
const Divider(
190+
color: Color.fromARGB(0, 48, 46, 46),
191+
),
172192
Container(
173193
key: projectsKey,
174194
width: MediaQuery.of(context).size.width * 1,
@@ -280,30 +300,25 @@ class _FilterDrawerState extends State<FilterDrawer> {
280300
'Urgency',
281301
])
282302
ChoiceChip(
283-
label:
284-
(storageWidget.selectedSort.startsWith(sort))
285-
? Text(
286-
storageWidget.selectedSort,
287-
)
288-
: Text(sort),
303+
label: (storageWidget.selectedSort.startsWith(sort))
304+
? Text(
305+
storageWidget.selectedSort,
306+
)
307+
: Text(sort),
289308
selected: false,
290309
onSelected: (_) {
291310
if (storageWidget.selectedSort == '$sort+') {
292311
storageWidget.selectSort('$sort-');
293-
} else if (storageWidget.selectedSort ==
294-
'$sort-') {
312+
} else if (storageWidget.selectedSort == '$sort-') {
295313
storageWidget.selectSort(sort);
296314
} else {
297315
storageWidget.selectSort('$sort+');
298316
}
299317
},
300318
labelStyle: GoogleFonts.poppins(
301-
color: AppSettings.isDarkMode
302-
? TaskWarriorColors.black
303-
: TaskWarriorColors.white),
319+
color: AppSettings.isDarkMode ? TaskWarriorColors.black : TaskWarriorColors.white),
304320
backgroundColor: AppSettings.isDarkMode
305-
? TaskWarriorColors
306-
.kLightSecondaryBackgroundColor
321+
? TaskWarriorColors.kLightSecondaryBackgroundColor
307322
: TaskWarriorColors.ksecondaryBackgroundColor,
308323
),
309324
],
@@ -321,11 +336,9 @@ class _FilterDrawerState extends State<FilterDrawer> {
321336
: TaskWarriorColors.ksecondaryBackgroundColor),
322337
child: TextButton(
323338
onPressed: () {
324-
if (storageWidget.selectedSort.endsWith('+') ||
325-
storageWidget.selectedSort.endsWith('-')) {
339+
if (storageWidget.selectedSort.endsWith('+') || storageWidget.selectedSort.endsWith('-')) {
326340
storageWidget.selectSort(
327-
storageWidget.selectedSort.substring(0,
328-
storageWidget.selectedSort.length - 1));
341+
storageWidget.selectedSort.substring(0, storageWidget.selectedSort.length - 1));
329342
}
330343
},
331344
child: Text(

lib/model/storage/storage_widget.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ class _StorageWidgetState extends State<StorageWidget> {
203203
}
204204

205205
void toggleWaitingFilter() {
206+
print("toggle waiting called in storage widget");
206207
Query(storage.tabs.tab()).toggleWaitingFilter();
207208
waitingFilter = Query(storage.tabs.tab()).getWaitingFilter();
208209
_refreshTasks();

lib/widgets/taskfunctions/query.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ class Query {
4545
}
4646

4747
void toggleWaitingFilter() {
48+
print("toggle waiting called");
4849
_waitingFilter.writeAsStringSync(
4950
json.encode(!getWaitingFilter()),
5051
);

0 commit comments

Comments
 (0)