-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[go_router_builder] add support to go_router_builder
for initializing a ShellRoute
with observers
#5563
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
Conversation
feat: add observers support to `ShellRouteData`
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie or stuartmorgan on the #hackers channel in Chat (don't just cc them here, they won't see it! Use Discord!). 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. |
My intent is to add a test, but in order to do so I'll need to pull in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, please update the version bump
Co-authored-by: chunhtai <47866232+chunhtai@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…itializing a `ShellRoute` with `observers` (flutter/packages#5563)
flutter/packages@15584a3...6cd0657 2023-12-08 ditman@gmail.com [gis_web] Correct pub.dev changelog entry. (flutter/packages#5613) 2023-12-08 43759233+kenzieschmoll@users.noreply.github.com Add the ability to run web_benchmarks with Wasm (flutter/packages#5611) 2023-12-08 stuartmorgan@google.com [google_sign_in] Endorse macOS implementation (flutter/packages#5600) 2023-12-07 clairepdavis@gmail.com [go_router_builder] add support to `go_router_builder` for initializing a `ShellRoute` with `observers` (flutter/packages#5563) 2023-12-07 41113988+MarinMikael@users.noreply.github.com [go_router] Fix(docs): Typo in Update navigation.md (flutter/packages#5545) 2023-12-07 katelovett@google.com [two_dimensional_scrollables] Expose addAutomaticKeepAlives in Table delegates (flutter/packages#5597) 2023-12-07 cepadilla@google.com [pigeon] Fix pigeon issue_tracker link (flutter/packages#5505) 2023-12-07 louisehsu@google.com Pointer interceptor implementations (flutter/packages#5594) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC flutter-ecosystem@google.com,rmistry@google.com 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
if (parameterName.toLowerCase().contains('navigatorkey')) { | ||
if (parameterName | ||
.toLowerCase() | ||
.contains(RegExp('navigatorKey | observers'))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't this no longer match against navigatorKey
due to the toLowerCase()
call? It also would require a space after navigatorKey
or before observers
in order to actually match
This pr added the ability to provide a list of
NavigatorObservers
to aShellRoute
. The equivalent was never added togo_router_builder
, so this pr provides that functionality.This is a workaround to this issue where navigator observers added to a
GoRouter
at the top level do not fire inShellRoutes
. With this change, you can provideNavigatorObservers
directly to theShellRoute
Pre-launch Checklist
dart format
.)[shared_preferences]
pubspec.yaml
with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.md
to add a description of the change, following repository CHANGELOG style.///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.