How to nest FlowStacks using shared state
mainYou can nest a child FlowStack within a parent coordinator by instantiating the child without its own data binding. In this mode, the child shares the parent's FlowPath as its source of truth.
Key Behaviors:
- Shared Path: Any type can be pushed onto the path. As long as a
flowDestinationmodifier is declared for that type somewhere in the stack, the screen will be shown. - Unified Navigation: Both parent and child can push new routes. The parent's path will include all routes pushed by the child.
- Global Reset: Calling
goBackToRootfrom the child will navigate all the way back to the parent's root screen. - Responsibility: The parent determines whether the child is shown with navigation or not.