Slide 39
Slide 39 text
39
animateTo 🧐
suspend fun animateTo(
targetValue: T,
animationSpec: AnimationSpec = defaultSpringSpec,
initialVelocity: T = velocity,
block: (Animatable.() -> Unit)? = null
): AnimationResult {
val anim = TargetBasedAnimation(
animationSpec = animationSpec,
initialValue = value,
targetValue = targetValue,
typeConverter = typeConverter,
initialVelocity = initialVelocity
)
return runAnimation(anim, initialVelocity, block)
}