How navigate to graph with all its destinations to the top of the back stack (remove the old one and put it on top)?

39 Views Asked by At

When I navigate to some graph (for example graph2), I want to move the entire graph with all its destinations to the top of the back stack (remove the old one and put it on top). How can this be done? In the image, what I mean is

navCntrl.navigate(GRAPH_2) {
  launchSingleTop = true
  restoreState = true
  popUpTo(navCntrl.graph.findStartDestination().id) {
  saveState = true
}
0

There are 0 best solutions below