packages
packages copied to clipboard
[go_router] Add support for preloading branches of StatefulShellRoute (revised solution)
Adds support for preloading branches in a StatefulShellRoute. This functionality was initially part of an early implementation of flutter/packages#2650, however it was decided to implement this in a separate PR. The current implementation is a rewrite of the original implementation to better fit the final version of StatefulShellRoute (and go_router in general).
NOTE: this is a revised version of the initial solution (see flutter/packages#4251), containing a substantially simpler implementation made possible thanks to recent refactoring in go_router.
This fixes issue flutter/flutter#127804.
Pre-launch Checklist
- [x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
- [x] I read the Tree Hygiene wiki page, which explains my responsibilities.
- [x] I read and followed the relevant style guides and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use
dart format.) - [x] I signed the CLA.
- [x] The title of the PR starts with the name of the package surrounded by square brackets, e.g.
[shared_preferences] - [x] I linked to at least one issue that this PR fixes in the description above.
- [x] I updated
pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes. - [x] I updated
CHANGELOG.mdto add a description of the change, following repository CHANGELOG style. - [x] I updated/added relevant documentation (doc comments with
///). - [x] I added new tests to check the change I am making, or this PR is test-exempt.
- [x] All existing and new tests are passing.
If you need help, consider asking for advice on the #hackers-new channel on Discord.
I know I have been slacking off at this pr. I am sorry about this. My schedule is quite tight after I came back from vacation. This is still under my radar. I will try find time review this pr within 2 weeks
I know I have been slacking off at this pr. I am sorry about this. My schedule is quite tight after I came back from vacation. This is still under my radar. I will try find time review this pr within 2 weeks
No worries @chunhtai, I completely understand, have had far too much on my plate myself the last year 😅
Any updates on this?
What's the status here ? It seems like you said that you have a test locally that's failing but it's unrelated to the changes here ?
What's the status here ? It seems like you said that you have a test locally that's failing but it's unrelated to the changes here ?
Yes, @chunhtai, have you had a chance to too look at my comment above (https://github.com/flutter/packages/pull/6467#discussion_r1644576099)?
The issue is however only with testing if obsolete branch navigators are removed (which is done dynamic RoutingConfig), so possibly this could be moved to a separate issue/PR. And another issue should probably be opened for fixing the support for dynamic RoutingConfig for (stateful) shell routes. What do you think @chunhtai?
will take a look this week
Any status update? Would love to have this feature in my project.
@chunhtai, as mentioned above, I've included the fix for cleaning obsolete branches. But I'm thinking it might be better to postpone that fix until the issues with duplicate GlobalKeys is resolved.
@chunhtai can this PR get some love ? (feedback)
FYI, for those interested in StatefulShellRoute evolution, there is a related (draft) PR in the works: flutter/packages#7622. There are some ideas around quality-of-life improvements around StatefulShellRoute in there, so have a look if you're interested.
Hi! Sorry, when will this be live?
Hi @tolo can you rebase and then we can merge?
@chunhtai Can autosubmit be added ? as conflicts were already resolved 2 weeks ago
auto label is removed for flutter/packages/6467, due to - The status or check suite Linux repo_checks has failed. Please fix the issues identified (or deflake) before re-applying this label.
Looks like there is some outdated excerpt https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8731887329080081345/+/u/Run_package_tests/README_snippet_validation/stdout?format=raw
I can't fix it through gihub ui. @tolo can you try to fix it?