Repository navigation
[go_router] Document when GoRouterState.name and path are null - #13486
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging. If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. If both you and the PR author believe this PR qualifies for a test exemption, escalate to the tech lead for the changed area to review and apply the |
There was a problem hiding this comment.
Code Review
This pull request updates the documentation for GoRouterState.name and GoRouterState.path to clarify the specific scenarios in which these properties are null, and adds a corresponding changelog entry. The feedback suggests a grammatical correction to ensure proper subject-verb agreement in the updated documentation for GoRouterState.path.
| /// the state built for a [ShellRoute] or [StatefulShellRoute] (which have no | ||
| /// path of their own), and the state used for the error page. |
There was a problem hiding this comment.
The phrase 'a [ShellRoute] or [StatefulShellRoute]' is singular disjunctive, so the parenthetical clause should use singular verbs and pronouns ('has' and 'its') for proper subject-verb agreement.
| /// the state built for a [ShellRoute] or [StatefulShellRoute] (which have no | |
| /// path of their own), and the state used for the error page. | |
| /// the state built for a [ShellRoute] or [StatefulShellRoute] (which has no | |
| /// path of its own), and the state used for the error page. |
Piinks
left a comment
There was a problem hiding this comment.
Hi @Alokxyz1112 welcome. Thanks for contributing. This doc change is test exempt and LGTM
9a5ba5d to
6f440dc
Compare
…er#197056) flutter/packages@81b7c44...898818d 2026-11-20 [email protected] [material_ui] Use correct time format for Sinhala locale (flutter/packages#13645) 2026-11-20 [email protected] [material_ui] Fix showModalBottomSheet safe area on display-feature sub-screens (flutter/packages#13428) 2026-11-20 [email protected] [material_ui] Fix M3 doc errors in the `ElevatedButton` and `FilledButton` (flutter/packages#13685) 2026-11-19 [email protected] [video_player] Convert implementation to Kotlin (flutter/packages#13683) 2026-11-19 [email protected] [flutter_svg] Add SvgLoader.provideSvgInIsolate for unsendable loaders (flutter/packages#13598) 2026-11-19 [email protected] [VPAT] Expose modal drawers with the dialog semantics role (flutter/packages#13660) 2026-11-19 [email protected] [VPAT] Keep a11y_assessments tooltips open while hovered (flutter/packages#13657) 2026-11-19 [email protected] [flutter_svg] Stabilize network SVG cache keys (flutter/packages#13597) 2026-11-19 [email protected] [image_picker_ios] Return an error instead of an empty file when an image cannot be saved (flutter/packages#12998) 2026-11-19 [email protected] [cupertino_ui] Fix CupertinoNavigationBarBackButton assertion debug (flutter/packages#13397) 2026-11-19 [email protected] [go_router] Document when GoRouterState.name and path are null (flutter/packages#13486) If this roll has caused a breakage, revert this CL and set the roller to dry run mode using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
GoRouterState.nameandGoRouterState.pathare nullable, and the docs only said they can be null for the top level redirect, which left people guessing (see the issue). Going through every place that builds aGoRouterState, they are left null in:RouteConfiguration.buildTopLevelGoRouterState, used for the top levelGoRouter.redirectandonExceptionShellRouteMatch.buildState, since aShellRoute/StatefulShellRoutehas no path of its ownRouteBuilder._buildErrorState, used for the error pagenameis also null when theGoRoutejust has no name. This updates both doc comments to list those cases. Added a pending changelog entry (patch).Fixes flutter/flutter#121086
Pre-Review Checklist
[shared_preferences]///).Tests: exempt, this only changes doc comments.
Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2