[go_router] Refactors GoRouter.pop to handle pageless route#2879
[go_router] Refactors GoRouter.pop to handle pageless route#2879auto-submit[bot] merged 2 commits intoflutter:mainfrom
Conversation
| /// The iterator starts with the navigator that hosts the top-most route. This | ||
| /// navigator may not be the inner-most navigator if the top-most route is a | ||
| /// pageless route, such as a dialog or bottom sheet. |
There was a problem hiding this comment.
Why not? Isn't it okay to have an inner Navigator with a page-backed route and a pageless route?
There was a problem hiding this comment.
Am I understanding correctly that this function returns a Iterator<NavigatorState> in the order that maybePop() should be called?
There was a problem hiding this comment.
Why not? Isn't it okay to have an inner Navigator with a page-backed route and a pageless route?
Consider this case
matchlist: [ShellRoute, GoRouteA]
user in GoRouteA and called showDialog to push a dialog to root navigator. In that case the maybepop should be call on the root navigator instead of the shellroute navigator.
Am I understanding correctly that this function returns a Iterator in the order that maybePop() should be called?
correct.
johnpryan
left a comment
There was a problem hiding this comment.
LGTM - just a few questions about the iterator
|
also cc @ValentinVignal since you have been working on imperative API a lot |
fixes flutter/flutter#100933
also make canPop and popRoute(android back button) to be able to pop dialog pushed to any navigator
Pre-launch Checklist
dart format.)[shared_preferences]pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.mdto 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.