Updated MaterialStatesController class api doc#134592
Merged
HansMuller merged 2 commits intoflutter:masterfrom Sep 13, 2023
Merged
Updated MaterialStatesController class api doc#134592HansMuller merged 2 commits intoflutter:masterfrom
HansMuller merged 2 commits intoflutter:masterfrom
Conversation
LongCatIsLooong
approved these changes
Sep 13, 2023
| /// controller's [value] tracks its intrinsic state. For example one | ||
| /// cannot request the keyboard focus for a widget by adding | ||
| /// [MaterialState.focused] to its controller. When the widget gains the | ||
| /// or loses the focus it will [update] its controller's [value] and |
Contributor
There was a problem hiding this comment.
nit: it will [update] -> the widget should typically [update] it's controller's [value] to reflect the focus change visually?
, since the controller can override the visual appearance?
Contributor
Author
There was a problem hiding this comment.
You're right that the widget isn't required to update its MaterialStatesController to match its intrinsic state. There are no examples of widgets that don't do this and I don't know of a use case where it would be useful to do so, so I think it's OK to leave this strong statement in place.
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Sep 13, 2023
8 tasks
Mairramer
pushed a commit
to Mairramer/flutter
that referenced
this pull request
Oct 10, 2023
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Nov 15, 2023
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Resolves #133977 (comment)