[ Resolved ] Hi, Iโ€™m facing issue in animating transition in Compose. ```var mProgress by remember ...
a
[ Resolved ] Hi, Iโ€™m facing issue in animating transition in Compose.
Copy code
var mProgress by remember { mutableStateOf(0F) }

val transition = updateTransition(targetState = mProgress, label = "")
Currently, On Button Click, I can easily change mProgress value and view will be animated But Iโ€™ve donโ€™t want to animate on Button Clicked, rather the view should be animated as soon as it is displayed in screen. Tried a lot of things but no luck ๐Ÿ˜ž Any suggestion ?
a
animatedFloatAsState()
?
๐Ÿ‘€ 1
f
You could fire animation in
LaunchedEffect
Copy code
val mProgress = remember { mutableStateOf(0F) }
LaunchedEffect(Unit) {
    mProgress.value = 1f
}
โœ… 1
a
@fatih Thanks ๐Ÿ™Œ This is what I was missing actually ๐Ÿ˜„
๐Ÿ‘ 1