Repository navigation
[go_router] Stop state lookup from revisiting a navigator - #13883
Draft
GianSandoval5 wants to merge 1 commit into
Draft
GianSandoval5 wants to merge 1 commit into
GianSandoval5 wants to merge 1 commit into
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a page first reads
GoRouterState.of(context)during its exit transition inside aShellRoute, its page may already be absent from the registry. The fallback reaches the enclosing Navigator's own context, which resolves to that same Navigator forever.Stop that non-progressing lookup with the existing
GoError. Previously associated states still resolve during exit. This does not extend registry lifetimes or promise a state for an unregistered closing page.Fixes flutter/flutter#197930
Adds five regressions: first lookup during root/shell exit, previously associated state during root/shell exit, and lookup from a shell Navigator's own context. Includes a pending patch changelog for
release:batch:true.Validation
ae9b586f34a8443573f82ef57c3bf914a908cbf7), Dart 3.14.0; upstream base1c37984f588afbebd027b58fe7d45094b97779c8.builder.dartchange from [go_router] Keep shell navigator state when a parent shell moves it #13565 at1f5e0ce7e8f57f982a2008d7434a92925b527084still hangs in that regression (exit 124). That comparative third-party patch is excluded from this PR. This addresses the separate non-progressing Navigator lookup, not [go_router] Keep shell navigator state when a parent shell moves it #13565's association change.cd630b5bf1ea441058504ce4155f63790455ed84is identical between that validation commit and this functional commit. CI instrumentation is kept on a separate fork branch.AI-assisted preparation. Kept as draft for Gian's personal review and project review; the personal checklist below is intentionally unmarked. No agreement has been signed on the contributor's behalf. A previous PR's CLA result is not asserted as this PR's CLA result.
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