Hi Guys. Is there any way to detect when bottom sh...
# compose
k
Hi Guys. Is there any way to detect when bottom sheet is dismissed? For now I subscribe to navController’s current back stack entry flow inside bottom sheet, but it feels like hacky solution.
Copy code
LaunchedEffect(Unit) {
  navController.currentBackStackEntryFlow
    .filter { it.destination.route == parentRoute }
    .collect { onClose() }
}
j
What's your use case?
k
I want to know if user leave bottom sheet to cancel started action.