How do you run things at the end of an animation? ...
# compose
r
How do you run things at the end of an animation? I'm probably thinking about this wrong, but I want to use
Animatable
to move a Float from 0 to 1.0 and then set some state to null at the end. I thought
animateTo
might have an
onDone
block, but no.
t
Since the animation APIs are
suspend
functions, you can simply run your "done" block sequentially after the animation is invoked
❤️ 2
2
s
^ this also makes it easy to start another animation after a cancellable animation correctly
2
r
Wow, thanks. Coroutines have not clicked in my old head yet.
⏸️ 8