-
Notifications
You must be signed in to change notification settings - Fork 27.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[go_router] relax requirement for child route paths preventing child routes from starting with '/' #145867
Labels
found in release: 3.19
Found to occur in 3.19
found in release: 3.21
Found to occur in 3.21
has reproducible steps
The issue has been confirmed reproducible and is ready to work on
p: go_router
The go_router package
P3
Issues that are less important to the Flutter project
package
flutter/packages repository. See also p: labels.
team-go_router
Owned by Go Router team
triaged-go_router
Triaged by Go Router team
Comments
The exception thrown is as below: console error log
stable, master flutter doctor -v
|
darshankawar
added
package
flutter/packages repository. See also p: labels.
has reproducible steps
The issue has been confirmed reproducible and is ready to work on
p: go_router
The go_router package
team-go_router
Owned by Go Router team
found in release: 3.19
Found to occur in 3.19
found in release: 3.21
Found to occur in 3.21
and removed
in triage
Presently being triaged by the triage team
labels
Mar 28, 2024
chunhtai
added
P3
Issues that are less important to the Flutter project
triaged-go_router
Triaged by Go Router team
labels
Jun 13, 2024
11 tasks
cedvdb
changed the title
[go_router] remove requirement for top level path to start with
[go_router] relax requirement for child route paths preventing child routes from starting with '/'
Sep 13, 2024
/
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
found in release: 3.19
Found to occur in 3.19
found in release: 3.21
Found to occur in 3.21
has reproducible steps
The issue has been confirmed reproducible and is ready to work on
p: go_router
The go_router package
P3
Issues that are less important to the Flutter project
package
flutter/packages repository. See also p: labels.
team-go_router
Owned by Go Router team
triaged-go_router
Triaged by Go Router team
Steps to reproduce
Create a GoRoute starting with '/'. That compiles just fine. Now place that route as a child of another route => assertion error.
Expected results
Either all routes should require
/
or none should. As it is currently, it violates an OOP principles where an object must be in a valid state after construction.Concretely I cannot create an
AccountRoute
for example that is not aware where it is going to be placed. Will it be a child of another route or will it be a "root" route ? None of its business. You also can't move route around without modifying their path.If internally go_router requires some special rules it should deal with it internally and not reflected those in the public API.
Actual results
assertion throws: sub-route path may not start or end with "/": $route'
Code sample
Screenshots or Video
No response
Logs
No response
Flutter Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.19.2, on Microsoft Windows [Version 10.0.22631.3296], locale en-BE)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Build Tools 2019 16.11.32)
[√] Android Studio (version 2023.1)
[√] VS Code (version 1.87.2)
[√] Connected device (3 available)
[√] Network resources
• No issues found!
The text was updated successfully, but these errors were encountered: