did everything, like really
This commit is contained in:
@@ -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',
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user