-
Notifications
You must be signed in to change notification settings - Fork 30.5k
[go router] Allow building of a path not defined with routes and subroutes #107240
Copy link
Copy link
Closed
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterp: go_routerThe go_router packageThe go_router packagepackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter respondsThe Flutter team cannot make further progress on this issue until the original reporter responds
Description
Metadata
Metadata
Assignees
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterp: go_routerThe go_router packageThe go_router packagepackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter respondsThe Flutter team cannot make further progress on this issue until the original reporter responds
Type
Fields
Give feedbackNo fields configured for issues without a type.
Use case
I'm developing an application that has a page that can be accessed via multiple locations:
The page is
DetailsPageand is accessible fromHomePageandListPageFor now to access it I need to define two routes:
/home/detailsand/list/detailsWhich gives the following code
It duplicates the route declaration and is not ideal at all. (It is ok when the route has only two access points but what if it has 10 or not event a pre determined number?)
Proposal
A solution to that would be to be able to declare some
GoRoutesas accessible from multiple points.Either allowing for something like
Or even using wildcard or regexp
That last solution has the advantage of allowing the opening of any stack of pages from a deeplink (for example /home/list/details) without having to define all the possible routes as it is required today.