WidgetStatesData class

Data class wrapping a set of widget states.

WidgetStatesData is a simple container for a Set<WidgetState> that can be passed through the widget tree using the Data inherited widget system. It's used by components like Clickable to propagate state information (hovered, pressed, focused, etc.) to descendant widgets.

Example:

const statesData = WidgetStatesData({WidgetState.hovered, WidgetState.focused});

Constructors

WidgetStatesData(Set<WidgetState> states)
Creates widget states data with the specified states.
const

Properties

hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
states Set<WidgetState>
The set of current widget states.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override