Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to implement popUpTo start naviagtion #42

Open
Al-Hussein-96 opened this issue Aug 3, 2022 · 1 comment
Open

How to implement popUpTo start naviagtion #42

Al-Hussein-96 opened this issue Aug 3, 2022 · 1 comment

Comments

@Al-Hussein-96
Copy link

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,

@HossamSadekk
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants