replace method

void replace(
  1. UMediaNote note
)

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();
}