I have fragments that are navigated in a subsequent order of A->B->C->D. However, I want to implement conditional navigation where I would land the user directly on “C’ as the first destination when a specific condition is met. When the user presses back while on C, they should taken to B and so on. The issue I have is that A and B are not in the backstack when you start by launching C. I tried using NavBackStackEntry class to create the 2 destinations(A & B) and add them to the backstack without showing them to the user but NavBackStackEntry constructor is package private. What is the best way to do this?
google 7
stackoverflow 6
😶 8