EchoPanelCubit constructor

EchoPanelCubit({
  1. required ScorePlayer player,
  2. required ScoreTimeline timeline,
  3. required StateStreamable<RepeatStatus?> repeat,
  4. required Map<int, int> rewinds(),
  5. required AppClock clock,
  6. 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),
         ),
       ),
     );