M3EInteractionState class
The mutually reinforcing interaction states of a component.
Only the highest priority active state contributes a state layer at a time, matching the Material specification (pressed over focus over hover).
- Annotations
Constructors
- M3EInteractionState({bool hovered = false, bool focused = false, bool pressed = false, bool dragged = false})
-
Creates an interaction state snapshot.
const
Properties
- dragged → bool
-
Whether the component is being dragged.
final
- focused → bool
-
Whether the component is keyboard-focused.
final
- hashCode → int
-
Hash code for this interaction state.
no setteroverride
- hovered → bool
-
Whether the pointer is hovering the component.
final
- opacity → double
-
Resolves the effective state layer opacity for the active state.
no setter
- pressed → bool
-
Whether the component is pressed.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
copyWith(
{bool? hovered, bool? focused, bool? pressed, bool? dragged}) → M3EInteractionState - Returns a copy with the given fields replaced.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
Equality based on public fields.
override