TrackPlayback constructor

TrackPlayback({
  1. required Track<Object> track,
  2. required List<TrackStep<Object>> steps,
  3. required bool isLooping,
  4. required int currentStepIndex,
  5. required int direction,
  6. required bool isWaitingForSync,
  7. required Duration startOffset,
  8. required Duration playhead,
  9. required List<Duration?> stepDurations,
  10. required List<Duration?> estimatedStepDurations,
  11. List<PlaybackSegment> segments = const [],
  12. Duration? loopPeriod,
  13. Duration? loopRepeatStart,
})

Creates an immutable track playback snapshot.

Implementation

TrackPlayback({
  required this.track,
  required List<TrackStep<Object>> steps,
  required this.isLooping,
  required this.currentStepIndex,
  required this.direction,
  required this.isWaitingForSync,
  required this.startOffset,
  required this.playhead,
  required List<Duration?> stepDurations,
  required List<Duration?> estimatedStepDurations,
  List<PlaybackSegment> segments = const [],
  this.loopPeriod,
  this.loopRepeatStart,
})  : steps = List.unmodifiable(steps),
      segments = List.unmodifiable(segments),
      stepDurations = List.unmodifiable(stepDurations),
      estimatedStepDurations = List.unmodifiable(estimatedStepDurations);