animate

fun animate(transitionSpec: Transition.Segment<S>.() -> FiniteAnimationSpec<T>, targetValueByState: (state: S) -> T): State<T>

DeferredAnimation allows the animation setup to be deferred until a later time after composition. animate can be used to set up a DeferredAnimation. Like other Transition animations such as Transition.animateFloat, DeferredAnimation also expects transitionSpec and targetValueByState for the mapping from target state to animation spec and target value, respectively.