-
Notifications
You must be signed in to change notification settings - Fork 29.7k
fix pushAndRemoveUntil incorrectly removes the routes below the first… #56732
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
goderbauer
left a comment
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
| // Regression https://github.com/flutter/flutter/issues/56688 | ||
| final GlobalKey<NavigatorState> navigator = GlobalKey<NavigatorState>(); | ||
| final Map<String, WidgetBuilder> routes = <String, WidgetBuilder>{ | ||
| '/' : (BuildContext context) => const Text('home'), |
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.
| '/' : (BuildContext context) => const Text('home'), | |
| '/': (BuildContext context) => const Text('home'), |
|
Did this bug make it into the latest stable? We should consider a cherry-pick if it did since this could potentially break apps pretty badly... |
unfortunately yes... cc @tvolkert Is there a process to evaluate whether we should push a hot fix for this bug? |
|
@chunhtai the process is to apply the cherry-pick request label to the issue. I just labeled #56688 accordingly. @pcsosinski FYI |
* Always remove the workspace settings (#56703) * [flutter_tools] hide tree-shake-icons (#56924) * fix pushAndRemoveUntil incorrectly removes the routes below the first… (#56732) * Update engine hash for 1.17.1 * fix customer_testing-windows Co-authored-by: Jenn Magder <[email protected]> Co-authored-by: Jonah Williams <[email protected]> Co-authored-by: chunhtai <[email protected]>
* Always remove the workspace settings (#56703) * [flutter_tools] hide tree-shake-icons (#56924) * fix pushAndRemoveUntil incorrectly removes the routes below the first… (#56732) * let the embedding maven engine dependency reference the storage proxy (#56164) * typo fix on the FLUTTER_STORAGE_BASE_URL usage (#56685) * Update engine hash for 1.18.0-11.1.pre Co-authored-by: Jenn Magder <[email protected]> Co-authored-by: Jonah Williams <[email protected]> Co-authored-by: chunhtai <[email protected]> Co-authored-by: xster <[email protected]> Co-authored-by: Luke Cheng <[email protected]>
|
When can we expect this to fix to make it to the stable channel? We are considering rolling back to 1.12 due to this breaking change. |
|
@mxa0079 this fix is in 1.17.1+ |
… matching route
Description
The navigator refactor accidentally change the behavior of pushAndRemoveUntil method. Instead of stopping at the first route that match the predicate, it continue scanning through the entire route history and removing all the routes that does not match the predicate.
This pr fixes it.
Related Issues
Fixes #56688
Tests
I added the following tests:
See files
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change
Did any tests fail when you ran them? Please read Handling breaking changes.