Question
After adding all the values inside _noteBox, when I try to print them, it shows me that box is empty.
Code sample
List<Note> noteList = _noteBox.values.cast<Note>().toList(); //storing list of all values in box named _noteBox
_noteBox..clear(); // clearing the box
noteList.insert(0, newNote); // insert new element at starting of noteList
_noteBox.addAll(noteList); // putting old+ 1 new value in the box
Question After adding all the values inside _noteBox, when I try to print them, it shows me that box is empty.
Code sample
Version