phraseStart method

int phraseStart(
  1. int index
)

O compasso (base 0) em que o trecho index começa.

Implementation

int phraseStart(int index) =>
    phrases.take(index).fold(0, (sum, p) => sum + p.bars);