Give each Note a unique id

Otherwise we're overwriting that one note.
This commit is contained in:
Vishesh Handa
2018-05-21 17:04:03 +02:00
parent 0cb36b2981
commit 973f21a24c
5 changed files with 14 additions and 9 deletions

View File

@ -3,11 +3,11 @@ typedef NoteRemover(Note note);
typedef NoteUpdator(Note note);
class Note implements Comparable {
final String id;
String id;
final DateTime createdAt;
final String body;
const Note({this.createdAt, this.body, this.id});
Note({this.createdAt, this.body, this.id});
factory Note.fromJson(Map<String, dynamic> json) {
return new Note(