animation Duration
Determines how long the content animates before it is fully dismissed. This can be used for scheduling an exit of your screen.
val gestureState = flickState.gestureState
if (gestureState is Dismissing) {
LaunchedEffect(Unit) {
delay(gestureState.animationDuration / 2)
navigator.goBack()
}
}Content copied to clipboard
You could also wait for the state to change to Dismissed as an exit signal, but that might be too late as most navigation frameworks have a delay from when an exit navigation is issued to when the screen actually hides from the UI.