Hello. I have some sort of overlay widget on top o...
# compose
s
Hello. I have some sort of overlay widget on top of my main content. I animate the appearance and disappearance of the overlay using the Transition animation API. On disappearance, I need to postpone the dismissal callback until the exit animation ends, otherwise the content of the overlay will simply disappear in one frame. I came up with this solution to await the transition end animation, but I'm wondering if there is a better way to do that. This feels a bit hacky to me.
d
snapshotFlow { transition.isRunning }.collect { if (it) { // The callback could go here }  }
would be the recommended way to get the finished event. 🙂
K 1
s
Thank you.