Garret Yoder
03/21/2024, 3:36 PMval rotation = remember { Animatable(0f) }
repeat(3) {
rotation.animateTo(360f, tween(1000))
rotation.snapTo(0f)
}
works, it just seems like there'd be a shorthand for it that I feel like I'm glossing over in the animation docsStylianos Gakis
03/21/2024, 3:40 PMGarret Yoder
03/21/2024, 3:42 PMStylianos Gakis
03/21/2024, 3:45 PMval rotation = remember { Animatable(0f) }
LaunchedEffect(Unit) {
repeat(3) {
rotation.animateTo(360f, tween(1000))
rotation.snapTo(0f)
}
}
So this just works for you correctly, right?Garret Yoder
03/21/2024, 3:57 PMGarret Yoder
03/21/2024, 3:58 PMval rotation = remember { Animatable(0f) }
OutlinedButton(
onClick = {
scope.launch {
repeat(3) {
rotation.animateTo(360f, tween(1000, easing = LinearEasing))
rotation.snapTo(0f)
}
...
Stylianos Gakis
03/21/2024, 4:06 PMGarret Yoder
03/21/2024, 4:09 PMZach Klippenstein (he/him) [MOD]
03/21/2024, 6:32 PManimateTo(360f, repeatable(iterations = 3, tween(1000, …)))
Garret Yoder
03/21/2024, 6:36 PMStylianos Gakis
03/21/2024, 6:38 PMGarret Yoder
03/21/2024, 6:40 PM