File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
packages/flutter/lib/src/material Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -735,11 +735,21 @@ class MaterialStatePropertyAll<T> implements MaterialStateProperty<T> {
735735///
736736/// Used by widgets that expose their internal state for the sake of
737737/// extensions that add support for additional states. See
738- /// [TextButton.statesController ] for example.
738+ /// [TextButton] for an example.
739739///
740740/// The controller's [value] is its current set of states. Listeners
741741/// are notified whenever the [value] changes. The [value] should only be
742742/// changed with [update] ; it should not be modified directly.
743+ ///
744+ /// The controller's [value] represents the set of states that a
745+ /// widget's visual properties, typically [MaterialStateProperty]
746+ /// values, are resolved against. It is _not_ the intrinsic state of
747+ /// the widget. The widget is responsible for ensuring that the
748+ /// controller's [value] tracks its intrinsic state. For example one
749+ /// cannot request the keyboard focus for a widget by adding
750+ /// [MaterialState.focused] to its controller. When the widget gains the
751+ /// or loses the focus it will [update] its controller's [value] and
752+ /// notify listeners of the change.
743753class MaterialStatesController extends ValueNotifier <Set <MaterialState >> {
744754 /// Creates a MaterialStatesController.
745755 MaterialStatesController ([Set <MaterialState >? value]) : super (< MaterialState > {...? value});
You can’t perform that action at this time.
0 commit comments