EchoPanelCubit constructor
EchoPanelCubit({ - required ScorePlayer player,
- required ScoreTimeline timeline,
- required StateStreamable<RepeatStatus?> repeat,
- required Map<int, int> rewinds(),
- required AppClock clock,
- required EchoPlan plan,
})
Implementation
EchoPanelCubit({
required this.player,
required this.timeline,
required this.repeat,
required this.rewinds,
required this.clock,
required this.plan,
}) : _beatsOf = _beatsByMeasure(timeline),
_endOf = [
for (final chunk in plan.chunks)
timeline.measures[chunk.answers.last].endMs.toDouble(),
],
_firstStartMs = timeline.measures.first.startMs.toDouble(),
super(
EchoPanelState(
chunkResults: List.unmodifiable(
List.filled(plan.chunks.length, EchoChunkStatus.pending),
),
),
);