forked from flutter/packages
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[go_router] Relax subroute path requirements (allow root and child ro…
…utes to have the same path forms ) (flutter#7647) Before this change `GoRoute` constructor allowed Schroedinger routes which were neither in a valid state nor an invalid state until they were used. EG: `GoRoute(path: '/some-route')` was valid as a top route but invalid as a child route. This prevents routes from being moved around and prevents building upon go router. To solve this I see two solution: 1. Breaking change: Require all routes to start with `/` (or none) 2. Non breaking: Allow all routes to start or not with `/` Since I did not want to introduce a breaking change I followed option 2, which allows all routes to be of the form `/some-route` or `some-route`. However, breaking changes aside, I believe it would be better to use solution 1 as it's more predictible. @chunhtai What do you think about those options ? Related issue: Fix flutter/flutter#145867
- Loading branch information
Showing
8 changed files
with
115 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters