TrackPlayback class
One track's live, read-only playback state.
- Annotations
-
- @experimental
- @immutable
Constructors
-
TrackPlayback({required Track<
Object> track, required List<TrackStep< steps, required bool isLooping, required int currentStepIndex, required int direction, required bool isWaitingForSync, required Duration startOffset, required Duration playhead, required List<Object> >Duration?> stepDurations, required List<Duration?> estimatedStepDurations, List<PlaybackSegment> segments = const [], Duration? loopPeriod, Duration? loopRepeatStart}) - Creates an immutable track playback snapshot.
Properties
- currentStepIndex → int
-
The active step index, or
-1once playback has settled.final - direction → int
-
The current direction:
1while forward and-1while reversing.final -
estimatedStepDurations
→ List<
Duration?> -
Stable duration estimates computed when this playback plan was created.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isLooping → bool
-
Whether this track's running plan contains an infinite loop.
final
- isWaitingForSync → bool
-
Whether this track is currently held at a synchronization barrier.
final
- loopPeriod → Duration?
-
Once a looping plan repeats exactly, the length of one repetition.
final
- loopRepeatStart → Duration?
-
Where the repeating part of a looping plan starts, when loopPeriod is
set.
final
- playhead → Duration
-
The latest elapsed position on this track's slot-local axis.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
segments
→ List<
PlaybackSegment> -
The resolved segments of this plan, oldest first, on the slot-local axis.
final
- startOffset → Duration
-
When the track's current plan started on the controller's playback
clock, the same timeline used by TrackController.scrubTo.
final
-
stepDurations
→ List<
Duration?> -
How long each forward step occupied the timeline, from its start until
the next step started, or
nulluntil recorded.final -
steps
→ List<
TrackStep< Object> > -
The flattened leaf steps of this track's running plan.
final
-
track
→ Track<
Object> -
The identity of the track represented by this snapshot.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited