animateTo

suspend fun animateTo(targetValue: T, anim: AnimationSpec<Float> = animationSpec)

Set the state to the target value by starting an animation.

Parameters

targetValue

The new value to animate to.

anim

The animation that will be used to animate to the new value.