fix pushAndRemoveUntil incorrectly removes the routes below the first…#56732
Merged
fluttergithubbot merged 2 commits intoflutter:masterfrom May 12, 2020
Merged
fix pushAndRemoveUntil incorrectly removes the routes below the first…#56732fluttergithubbot merged 2 commits intoflutter:masterfrom
fluttergithubbot merged 2 commits intoflutter:masterfrom
Conversation
goderbauer
approved these changes
May 11, 2020
| // 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'), |
Member
There was a problem hiding this comment.
Suggested change
| '/' : (BuildContext context) => const Text('home'), | |
| '/': (BuildContext context) => const Text('home'), |
Member
|
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... |
Contributor
Author
unfortunately yes... cc @tvolkert Is there a process to evaluate whether we should push a hot fix for this bug? |
Contributor
|
@chunhtai the process is to apply the cherry-pick request label to the issue. I just labeled #56688 accordingly. @pcsosinski FYI |
pcsosinski
pushed a commit
to pcsosinski/flutter
that referenced
this pull request
May 12, 2020
pcsosinski
pushed a commit
to pcsosinski/flutter
that referenced
this pull request
May 12, 2020
pcsosinski
pushed a commit
that referenced
this pull request
May 13, 2020
* 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]>
pcsosinski
pushed a commit
that referenced
this pull request
May 13, 2020
* 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+ |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
… 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.