Lisandro Di Meo
05/05/2022, 1:38 PMSwipeDismissableNavHost
I've found that the swiping gesture is ignoring the BackHandler
inside the composable. For example, if my nav graph is: A -> B -> C, and the swipe from C should redirect to A.
I think I have to custom some behavior of the SwipeToDismissBox, but I'm not sure how. Any help is appreciated!
composable(
Paths.WORD,
arguments = listOf(navArgument("language") { defaultValue = "EN" })
){ navBackStackEntry ->
BackHandler() { navController.navigate(Paths.HOME) }
CompleteWord(navController, listState, completeWordViewModel, navBackStackEntry.arguments?.getString("language")!!.toLanguage())
}
Lisandro Di Meo
05/05/2022, 6:17 PM