animatePosition

fun InfiniteTransition.animatePosition(initialValue: Position, targetValue: Position, animationSpec: InfiniteRepeatableSpec<Position>, label: String = "PositionAnimation"): State<Position>
inline fun <S> Transition<S>.animatePosition(noinline transitionSpec: @Composable Transition.Segment<S>.() -> FiniteAnimationSpec<Position> = { spring() }, label: String = "PositionAnimation", targetValueByState: @Composable (state: S) -> Position): State<Position>

See also