Bug on update.
abondar24 opened this issue · comments
Alex Bondar commented
I have just found a tiny bug in updateNote function in notes_service. If you add a note and close the app, after restart you will see that the text of all your notes will be the same and equal to the value of the last note. Hot restart also reproduces this behaviour.
The actual fix is to add id of note to a update query. Please see a snippet below
final updCount = await db.update(noteTable, where: 'id =?', whereArgs: [ id ], { textCol: text, });