ursus
07/27/2025, 2:14 PManimation that is a result of a event
?
Think of hitting a button and exploding confetti.
(So not a function of a state - like changing alpha to a certain value and staying there)Chrimaeon
07/27/2025, 3:17 PMChrimaeon
07/27/2025, 3:24 PMZach Klippenstein (he/him) [MOD]
07/27/2025, 4:23 PMAnimatable.animateTo
, the lower-level animate
function, or completely from scratch with frame callbacks like Christian suggested (just be aware of MotionDurationScale
in that case).ursus
07/27/2025, 4:24 PMZach Klippenstein (he/him) [MOD]
07/27/2025, 4:32 PMrememberCoroutineScope
to get a CoroutineScope
and then in your event handler call launch
on that.ursus
07/27/2025, 5:07 PMisPlaying bool
state which gets toggled and I want to play the vector morph animation of the icon in the button based on that , is that when I'd use LaunchedEffect(isPlaying)
?Zach Klippenstein (he/him) [MOD]
07/28/2025, 12:35 AMLaunchedEffect
with snapshotFlow
.