Reputation: 439
Cannot reset a stack with following use cases.
Let assume Screen A is a root, and navigate to Screen B, Then while navigating to Screen C, I want the stack to have A->C instead of A->B->C.
If a stack has A->B->C and I want to rest the stack with root screen as C.
Please help on this use cases
Upvotes: 1
Views: 399
Reputation: 3501
This use case is not supported as removing an element from the middle of a stack is not a valid stack api. You probably want to show B in a modal, then push C into the stack contained in the modal. If you want to disallow the user from going back from C to B, then instead of push use setStackRoot
with C.
use setStackRoot with C
Upvotes: 0