Jetpack Compose Animation skips to target value immediately
I'm trying to achieve a smooth animation of a simple round timer. Like this, but smoother
https://i.stack.imgur.com/dVTZx.gif▾
However it just skips to targetValue immediately and that's it there's no animation at all. I'm trying to do it like this:
@Composable
private fun SampleTimer(duration: Int, modifier: Modifier = Modifier) {
var animatedPercentage by remember { mutableStateOf(1f) }
LaunchedEffect(Unit) {
animate(...