PreCompose
PreCompose copied to clipboard
Version 1.5.10 breaks animation progress inside screen
New version 1.5.10
resets animation progress inside screen. In the example, progress indicator is animated from 0 to 1. Approximately when animatedProgress is between 0.05 - 0.1, composable recreates and animation starts from beginning. Maybe this happens because at that moment, animation from navigation finishes.
Example:
@Composable
fun TestProgress() {
var progress by remember { mutableStateOf(0f) }
val animatedProgress by animateFloatAsState(
targetValue = progress, animationSpec = tween(durationMillis = 500, easing = LinearEasing)
)
LaunchedEffect(Unit) {
progress = 1f
}
LinearProgressIndicator(
progress = animatedProgress,
)
}