replace method
Replaces a note (same id).
Implementation
void replace(UMediaNote note) {
final int index = _notes.indexWhere((UMediaNote existing) => existing.id == note.id);
if (index < 0) return;
_checkpoint();
_notes[index] = note;
_commit();
}