implemented undo button and proper sorting

This commit is contained in:
SomnusVeritas
2023-11-08 12:57:45 +01:00
parent 91ce231b04
commit c9deb726e0
4 changed files with 29 additions and 9 deletions

View File

@@ -1,7 +1,5 @@
import 'package:isar/isar.dart';
import '../services/dbhelper.dart';
part 'todo.g.dart';
@collection
@@ -13,11 +11,10 @@ class Todo {
bool done;
Todo({
int? index,
required this.id,
required this.title,
required this.createdAt,
this.description = '',
DateTime? createdTime,
this.done = false,
}) : createdAt = createdTime ?? DateTime.now(),
id = index ?? DbHelper.nextTodoId;
});
}