feat: Implement permanent deletion and restoration of notes with updated UI
This commit is contained in:
@@ -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,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user