stepAfter method

TrainingStep? stepAfter(
  1. int index
)

O passo depois do de posição index, ou null se ele é o último.

Implementation

TrainingStep? stepAfter(int index) {
  if (index + 1 >= stepCount) return null;
  return switch (this) {
    chords => chordSteps[index + 1],
    chordEar => chordEarSteps[index + 1],
    hanon => hanonSteps[index + 1],
    staffNotes => staffNotesSteps[index + 1],
    findKey => findKeySteps[index + 1],
    music => musicSteps[index + 1],
    _ => sightSteps[index + 1],
  };
}