infiniteRepeatable
fun <T> infiniteRepeatable(animation: DurationBasedAnimationSpec<T>, repeatMode: RepeatMode = RepeatMode.Restart, initialStartOffset: StartOffset = StartOffset(0)): InfiniteAnimationSpec<T>
Creates an InfiniteAnimationSpec that repeats animation for the lifetime of its owner. Because it never settles, it can only be consumed by useInfiniteAnimation, not by target-settling APIs.
infiniteRepeatable<Float>(animation = tween(1000.ms), repeatMode = RepeatMode.Reverse)Content copied to clipboard
Parameters
animation
The duration-based animation to repeat. Its cycle must have a positive duration (a zero-length cycle such as snap() would loop with no progress, so it is rejected).
repeatMode
Whether to restart or reverse on each iteration.
initialStartOffset
A one-time shift of the start time (delay or fast-forward) applied to the first cycle only — use StartOffsetType.FastForward to stagger several loops.