WidgetStateExtension extension

Extension methods for Set<WidgetState> to easily check interaction states.

on

Properties

isDisabled bool

Available on Set<WidgetState>, provided by the WidgetStateExtension extension

Checks whether the widget is disabled.
no setter
isFocused bool

Available on Set<WidgetState>, provided by the WidgetStateExtension extension

Checks whether the widget is focused.
no setter
isHovered bool

Available on Set<WidgetState>, provided by the WidgetStateExtension extension

Checks whether the widget is hovered.
no setter
isNone bool

Available on Set<WidgetState>, provided by the WidgetStateExtension extension

Checks whether the widget is in its default state.
no setter
isPressed bool

Available on Set<WidgetState>, provided by the WidgetStateExtension extension

Checks whether the widget is pressed.
no setter

Methods

isAllOf(Iterable<WidgetState> states) bool

Available on Set<WidgetState>, provided by the WidgetStateExtension extension

Checks whether the widget is in all of the provided states.
isAnyOf(Iterable<WidgetState> states) bool

Available on Set<WidgetState>, provided by the WidgetStateExtension extension

Checks whether the widget is in any of the provided states.

Static Methods

forStates<T>(Set<WidgetState> states, {required T disabled, required T none, T? pressed, T? hovering, T? focused}) → T

Available on Set<WidgetState>, provided by the WidgetStateExtension extension

Returns the value for the provided states.