Merged
Conversation
|
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 on the #hackers channel in Chat. Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
13 tasks
Piinks
commented
Aug 26, 2020
Piinks
commented
Aug 26, 2020
9797273 to
d608e4a
Compare
Piinks
commented
Aug 26, 2020
Piinks
commented
Aug 26, 2020
HansMuller
reviewed
Aug 28, 2020
Contributor
HansMuller
left a comment
There was a problem hiding this comment.
This looks good, most of the feedback is just small stuff.
Contributor
Author
|
I've updated this based on your feedback @HansMuller thank you! PTAL. :) |
HansMuller
approved these changes
Sep 3, 2020
| } | ||
|
|
||
| void _unregister(ScaffoldState scaffold) { | ||
| _scaffolds.remove(scaffold); |
Contributor
There was a problem hiding this comment.
Should we assert(_scaffolds.remove(scaffold)) here?
zanderso
added a commit
that referenced
this pull request
Sep 4, 2020
mingwandroid
pushed a commit
to mingwandroid/flutter
that referenced
this pull request
Sep 6, 2020
mingwandroid
pushed a commit
to mingwandroid/flutter
that referenced
this pull request
Sep 6, 2020
This reverts commit 48f1a0a.
This was referenced Oct 15, 2020
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.
Description
Framework Migration: #64170
Migration Guide: flutter/website#4527
This introduces the
ScaffoldMessenger, a new widget for handlingSnackBars.The
ScaffoldStatemethods of [showSnackBar,hideCurrentSnackBar, andremoveCurrentSnackBar] will call on theScaffoldMessengerif used. This prevents users from being broken by the change and allows them time to migrate their code.By using the
ScaffoldMessenger,SnackBars can persist across multipleScaffolds and transitions. This change also adds aHerotoSnackBars so that they transition smoothly.Hero flight between Scaffolds:
Asynchronous SnackBars:
Follow-up work:
Related Issues
Fixes #62921
Tests
All existing
SnackBartests have been migrated and passed. Added a few more for new persistence across routes.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.
Kind of, all calls to `Scaffold.of(context).showSnackBar/removeCurrentSnackBar/hideCurrentSnackBar are deprecated, but still work since they now call on the ScaffoldMessenger. This should not explicitly break anyone. Treating it as breaking anyways.