Halil Ozercan07/23/2020, 7:41 PM
composable is deprecated in favor of
which is highly similar but instead of receiving children as a trailing lambda, it provides a state that can be used by following composables in the same scope. The docs suggest that
is the main control unit for transition state. Whenever it changes, animation will change the course to this new destination state whether the animation was running or not. However, I'm having trouble understanding how to reset the current animation all together. Let's say my initial configuration is to go from
. In the middle of this transition, Composable receives a new state, which means the animation needs to restart. Animation should go back to state
and again head for
. I could not find a way of simply resetting
at the same time. What is the recommendation for such behavior?
Ian Lake07/23/2020, 7:50 PM
Halil Ozercan07/23/2020, 7:56 PM
, there are no shortcuts between states. I wish there was an easy way to reset animation state for simple use cases.
Doris Liu07/23/2020, 8:14 PM
Halil Ozercan07/23/2020, 8:39 PM
Doris Liu07/24/2020, 7:08 PM
and in some cases
. I'll consider having a similar variant for transition.