answerNote method

bool? answerNote(
  1. String id
)

Resposta tocando uma nota da partitura (listen-score com answer: note, E10): id é o xml:id da nota (ou o da cena). Vale qualquer das changedIds (no "juntar", são duas). Mesma convenção de retorno de answerChoice; numa pergunta sem compare, devolve null.

Implementation

bool? answerNote(String id) {
  if (done || revealing) return null;
  final ids = questions[index].compare?.changedIds;
  if (ids == null || ids.isEmpty) return null;
  if (ids.contains(id)) {
    index++;
    revealing = false;
    if (!done) _startAt = _lastTick ?? _now();
    return true;
  }
  _markWrong();
  return false;
}