minimise icon indicating copy to clipboard operation
minimise copied to clipboard

How to implement popUpTo start naviagtion

Open Al-Hussein-96 opened this issue 2 years ago • 1 comments

I added NavOptionsBuilder

interface NavigationCommand {
    val arguments: List<NamedNavArgument>
    val destination: String
    val builder: NavOptionsBuilder.() -> Unit
}

but I cannot access start navigation because I don't have reference on navController graph,

Al-Hussein-96 avatar Aug 03 '22 06:08 Al-Hussein-96

i used popUpTo and popBackStack() in this way : navController.navigate(command.destination){ // Clear the back stack up to the OnBoarding screen navController.popBackStack(OnBoardingDirections.onBoarding.destination, true) or // Clear the back stack launchSingleTop = true restoreState = true } hope i helped

HossamSadekk avatar Jun 10 '23 17:06 HossamSadekk