File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -107,8 +107,10 @@ class TaskDatabase {
107107
108108 Future <void > deleteAllTasksInDB () async {
109109 await ensureDatabaseIsOpen ();
110- await _database! .delete (
110+ debugPrint ("Delete All Tasks !" );
111+ await _database! .update (
111112 'Tasks' ,
113+ {'status' : 'deleted' },
112114 );
113115 }
114116
@@ -295,9 +297,10 @@ class TaskDatabase {
295297 await taskDatabase.open ();
296298 await taskDatabase.ensureDatabaseIsOpen ();
297299
298- final List <Map <String , dynamic >> result = await taskDatabase._database!
299- .rawQuery (
300- 'SELECT DISTINCT project FROM Tasks WHERE project IS NOT NULL' );
300+ final List <
301+ Map <String ,
302+ dynamic >> result = await taskDatabase._database! .rawQuery (
303+ 'SELECT DISTINCT project FROM Tasks WHERE project IS NOT NULL AND status IS NOT "deleted"' );
301304
302305 return result.map ((row) => row['project' ] as String ).toList ();
303306 }
You can’t perform that action at this time.
0 commit comments