-
Notifications
You must be signed in to change notification settings - Fork 26.8k
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
Updated MaterialStatesController class api doc #134592
Updated MaterialStatesController class api doc #134592
Conversation
/// 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 |
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.
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?
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.
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.
Resolves #133977 (comment)