File tree Expand file tree Collapse file tree 1 file changed +19
-11
lines changed
Expand file tree Collapse file tree 1 file changed +19
-11
lines changed Original file line number Diff line number Diff line change @@ -80,18 +80,26 @@ class _TasksBuilderState extends State<TasksBuilder> {
8080
8181 // Show a snackbar with an undo action
8282 ScaffoldMessenger .of (context).showSnackBar (SnackBar (
83- content: Text (
84- 'Task Updated' ,
85- style: TextStyle (
86- color: AppSettings .isDarkMode
87- ? TaskWarriorColors .kprimaryTextColor
88- : TaskWarriorColors .kLightPrimaryTextColor,
89- ),
83+ content: Text (
84+ 'Task Updated' ,
85+ style: TextStyle (
86+ color: AppSettings .isDarkMode
87+ ? TaskWarriorColors .kprimaryTextColor
88+ : TaskWarriorColors .kLightPrimaryTextColor,
9089 ),
91- backgroundColor: AppSettings .isDarkMode
92- ? TaskWarriorColors .ksecondaryBackgroundColor
93- : TaskWarriorColors .kLightSecondaryBackgroundColor,
94- duration: const Duration (seconds: 2 )));
90+ ),
91+ backgroundColor: AppSettings .isDarkMode
92+ ? TaskWarriorColors .ksecondaryBackgroundColor
93+ : TaskWarriorColors .kLightSecondaryBackgroundColor,
94+ duration: const Duration (seconds: 2 ),
95+ action: SnackBarAction (
96+ label: 'Undo' ,
97+ onPressed: () {
98+ // Undo the task status change
99+ undoChanges ();
100+ },
101+ ),
102+ ));
95103 }
96104
97105 void undoChanges () {
You can’t perform that action at this time.
0 commit comments