made task creation flow
This commit is contained in:
@@ -33,3 +33,37 @@ class SelfNote {
|
||||
'note_type': noteType == NoteType.image ? 'image' : 'text',
|
||||
};
|
||||
}
|
||||
|
||||
class TodoItem {
|
||||
String id;
|
||||
String title;
|
||||
String content;
|
||||
bool done;
|
||||
|
||||
Map? json;
|
||||
|
||||
TodoItem({
|
||||
required this.id,
|
||||
required this.title,
|
||||
required this.content,
|
||||
required this.done,
|
||||
this.json,
|
||||
});
|
||||
|
||||
factory TodoItem.fromJson(Map json) {
|
||||
return TodoItem(
|
||||
id: json['id'],
|
||||
title: json['title'],
|
||||
content: json['content'],
|
||||
done: json['done'],
|
||||
json: json,
|
||||
);
|
||||
}
|
||||
|
||||
get toJson => {
|
||||
'id': id,
|
||||
'title': title,
|
||||
'content': content,
|
||||
'done': done,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user