Jorge Domínguez
11/11/2021, 3:27 PMval currentState = remember {
MutableTransitionState(TransitionState.START)
.apply { targetState = TransitionState.END }
}
val transition = updateTransition(currentState, label = "")
the initial composition triggers the transition but I need to restart it whenever a Canvas draws something, which happens some time after the initial Transition is triggered.
I've tried doing currentState.targetState = TransitionState.END
right before drawing inside the Canvas but it doesn't work.Doris Liu
11/11/2021, 6:16 PMkey
around updateTransition
and change the key param to restartJorge Domínguez
11/12/2021, 7:34 PMkey
also sounds like a suitable solution. Thanks!