onInfiniteOperation

abstract suspend fun <R> onInfiniteOperation(block: suspend () -> R): R

Applies the policy to block, one wait for a single animation frame. Returning what block returns lets the animation carry on to its next frame; throwing kotlin.coroutines.cancellation.CancellationException ends it.