states property
Describes the current WidgetState of the Toggleable.
The returned set will include:
- WidgetState.disabled, if isInteractive is false
- WidgetState.hovered, if a pointer is hovering over the Toggleable
- WidgetState.focused, if the Toggleable has input focus
- WidgetState.selected, if value is true or null
Implementation
Set<WidgetState> get states => <WidgetState>{
if (!isInteractive) WidgetState.disabled,
if (_hovering) WidgetState.hovered,
if (_focused) WidgetState.focused,
if (value ?? true) WidgetState.selected,
};