79834239

Date: 2025-11-30 23:10:04
Score: 1
Natty:
Report link

Make the sub-route you want to reuse an independent branch, so that its path starts with '/' (i.e don't define the reusable route on top of other routes). This will allow go_router to find the full route path even when using named routes. Then use push() or pushNamed() to add the re-usable sub-route to the stack from wherever it's needed.

To illustrate:

enter image description here
The entire subroute of "/Reusable-screen 1 -> reusable-screen 2" should now be reusable throughout the navigation tree.

Reasons:
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Cherif Diallo