Change the way ActionDispatcher is found.#41245
Merged
gspencergoog merged 2 commits intoflutter:masterfrom Sep 26, 2019
Merged
Conversation
90df1ee to
eee0625
Compare
darrenaustin
approved these changes
Sep 26, 2019
Contributor
darrenaustin
left a comment
There was a problem hiding this comment.
LGTM.
Just some minor comments.
| }) | ||
| .map((DiagnosticsNode node) => node.toString()) | ||
| .toList(); | ||
| .where((DiagnosticsNode node) { |
Contributor
There was a problem hiding this comment.
Why the change in indentation here? I thought it was supposed to be two spaces for this kind of expression.
| Element actionsElement; | ||
| Action action; | ||
|
|
||
| if (identical(intent, Intent.doNothing)) { |
Contributor
There was a problem hiding this comment.
It would be good to have a test for this (unless I missed it below).
Contributor
Author
|
Crap. I didn't mean to commit this yet. I'll submit another PR that addresses your comments @darrenaustin |
9 tasks
gspencergoog
added a commit
that referenced
this pull request
Sep 27, 2019
This addresses comments in the original PR (#41245) that introduced Intent.doNothing, adds tests, and fixes an issue with it.
Inconnu08
pushed a commit
to Inconnu08/flutter
that referenced
this pull request
Sep 30, 2019
This changes the way ActionDispatchers are found by the Actions widget, so that by default it will look for dispatchers of the parent Actions widgets instead of just creating a default ActionDispatcher. This allows overriding of the ActionDispatcher at the top level: before, the custom action dispatcher would only be invoked if explicitly set on all the Actions widgets. This is not a breaking change because there was a default value to the dispatcher parameter before that performed this function, and not specifying the dispatcher anywhere will still result in a default dispatcher being created.
Inconnu08
pushed a commit
to Inconnu08/flutter
that referenced
this pull request
Sep 30, 2019
This addresses comments in the original PR (flutter#41245) that introduced Intent.doNothing, adds tests, and fixes an issue with it.
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
This changes the way
ActionDispatchers are found by theActionswidget, so that by default it will look for dispatchers of the parent Actions widgets instead of just creating a defaultActionDispatcher. This allows overriding of the ActionDispatcher at the top level: before, the custom action dispatcher would only be invoked if explicitly set on all the Actions widgets.This is not a breaking change because there was a default value to the
dispatcherparameter before that performed this function, and not specifying the dispatcher anywhere will still result in a default dispatcher being created.Tests
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
Does your PR require Flutter developers to manually update their apps to accommodate your change?