[go_router] Add route metadata support to GoRouterState.#11773
[go_router] Add route metadata support to GoRouterState.#11773star4277 wants to merge 2 commits into
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Code Review
This pull request introduces a metadata property to RouteBase and GoRouterState, enabling the association of custom data with routes. The implementation includes logic within RouteMatchList to handle metadata inheritance and overriding during route matching. GoRouterState is updated to incorporate this metadata into its equality and hashing logic, and new tests verify the expected behavior. I have no feedback to provide.
@star4277 I don't see this reflected in the PR. Are there changes you forgot to push? |
Sorry, I missed it, I've made it up now |
This PR adds route
metadatasupport across go_router route definitions, match resolution, andGoRouterState, including inheritance/override behavior and test coverage.metadatasupport toRouteBaseand all relevant route types.GoRouterState.metadata.Fixes flutter/flutter#187049, flutter/flutter#160738.
Pre-Review Checklist
[shared_preferences]///).If you need help, consider asking for advice on the #hackers-new channel on Discord.
Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the
gemini-code-assistbot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.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