materialStates property
getter/setter pair
Managed set of active MaterialState
values; designed to be passed to
MaterialStateProperty.resolve methods.
To mutate and have setState called automatically for you, use setMaterialState, addMaterialState, or removeMaterialState. Directly mutating the set is possible, and may be necessary if you need to alter its list without calling setState (and thus triggering a re-render).
To check for a single condition, convenience getters isPressed, isHovered,
isFocused, etc, are available for each MaterialState
value.
Implementation
@protected
Set<MaterialState> materialStates = <MaterialState>{};