did everything, like really

This commit is contained in:
Kima
2024-05-04 23:31:15 +02:00
parent 6d8d11cd87
commit 25a72da3a8
16 changed files with 450 additions and 125 deletions

View File

@@ -1,13 +1,18 @@
enum NoteType { text, image }
class SelfNote {
String id;
String? title;
String content;
NoteType noteType;
Map? json;
SelfNote({
required this.id,
this.title,
required this.content,
required this.noteType,
this.json,
});
@@ -16,6 +21,7 @@ class SelfNote {
id: json['id'],
title: json['title'],
content: json['content'],
noteType: json['note_type'] == 'image' ? NoteType.image : NoteType.text,
json: json,
);
}
@@ -24,5 +30,6 @@ class SelfNote {
'id': id,
'title': title,
'content': content,
'note_type': noteType == NoteType.image ? 'image' : 'text',
};
}