feat: Implement permanent deletion and restoration of notes with updated UI

This commit is contained in:
2026-05-19 11:40:01 +02:00
parent 2a898111fa
commit f550476177
7 changed files with 236 additions and 132 deletions
+4
View File
@@ -18,6 +18,7 @@ class Note {
required this.index,
this.serverVersion = 0,
this.isDeleted = false,
this.isPermanentlyDeleted = false,
this.categoryId,
}) : uuid = uuid ?? Uuid().v4();
@@ -30,6 +31,7 @@ class Note {
final int index;
final int serverVersion;
final bool isDeleted;
final bool isPermanentlyDeleted;
final String? categoryId;
Note copyWith({
@@ -42,6 +44,7 @@ class Note {
int? index,
int? serverVersion,
bool? isDeleted,
bool? isPermanentlyDeleted,
String? categoryId,
}) {
return Note(
@@ -54,6 +57,7 @@ class Note {
index: index ?? this.index,
serverVersion: serverVersion ?? this.serverVersion,
isDeleted: isDeleted ?? this.isDeleted,
isPermanentlyDeleted: isPermanentlyDeleted ?? this.isPermanentlyDeleted,
categoryId: categoryId ?? this.categoryId,
);
}