https://kotlinlang.org logo
#compose
Title
# compose
f

Florian Walther (live streaming)

12/29/2021, 1:14 PM
What's the dismiss callback in the
SwipeToDismiss
composable?
d
f

Florian Walther (live streaming)

12/29/2021, 1:58 PM
i wasn't sure where to call the side effect but it seems that
confirmStateChange
is the right place 👍 Thank you
l

lesincs

12/30/2021, 1:47 AM
I don’t think
confirmStateChange
is the right place, because it’s will be called even the animation is running. I think you should use
LaunchEffect
and then observe the
isDismissed
property of
DismissState
.
f

Florian Walther (live streaming)

12/30/2021, 12:03 PM
@lesincs Thank you very much. I think the documentation above is using
confirmStateChange
tho. Did you take a look at it? They toggle an
unread
boolean.
2 Views