TrackStep<T extends Object>.sync constructor
const
TrackStep<T extends Object>.sync ({
- required Object token,
A synchronization barrier that waits for sibling tracks.
When playback reaches this step, the track holds its current value until
every other active track that shares the same token (by ==) also
reaches a matching sync step. The controller then releases them together,
so the tracks continue in lockstep. While a track waits, a spring before
it with until: .ended keeps settling, and the step after the
barrier starts from where it is at the release.
A track arrives once the step before the barrier has settled, or, with
until: .ended, once it has ended, after its motion's
Motion.duration, while a spring keeps settling as it waits.
Use this to keep independent tracks aligned at key moments without hand-tuning each track's durations.
Implementation
const factory TrackStep.sync({required Object token}) = StepSync<T>;