updateTarget

fun updateTarget(target: T, coroutineScope: CoroutineScope, animationSpec: FiniteAnimationSpec<T> = spring()): T

updateTarget sets up an animation, or updates an already running animation, based on the target in the given coroutineScope. pendingTarget will be updated to track the last seen target.

updateTarget will return the current value of the animation after launching the animation in the given coroutineScope.

Return

current value of the animation