resetFor method

void resetFor(
  1. String entryId
)

Forgets the previous entry's errors.

Called from the same place the knobs and axes reset, and for the same reason: carrying one entry's failures into the next reports a demo as broken because the one before it was.

Only on a change of entry, because this runs from didUpdateWidget and therefore on every rebuild — turning a knob would otherwise wipe the record of the throw the previous knob caused. Which leaves reloading the same entry with nothing to clear it, and that is what clear is for.

Implementation

void resetFor(String entryId) {
  if (_entryId == entryId) return;
  _entryId = entryId;
  _errors.clear();
}