M3ETappable class
A reusable interaction primitive powering expressive components.
It tracks hover, focus and press states, exposes them to builder, drives an optional spring based press scale, and wires up keyboard activation and semantics so components stay focused on their own visuals.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- M3ETappable
Constructors
-
M3ETappable({required M3EStateWidgetBuilder builder, VoidCallback? onTap, VoidCallback? onLongPress, bool enabled = true, FocusNode? focusNode, bool autofocus = false, MouseCursor? mouseCursor, String? semanticLabel, bool semanticButton = true, bool excludeSemantics = false, double pressedScale = 1, M3ESpring spring = M3EMotion.expressiveSpatialPress, ValueChanged<
M3EInteractionState> ? onStateChanged, bool materialInk = false, Key? key}) -
Creates a tappable interaction surface.
const
Properties
- autofocus → bool
-
Whether this surface should request focus when first shown.
final
- builder → M3EStateWidgetBuilder
-
Builds the visual for the current interaction M3EInteractionState.
final
- enabled → bool
-
Whether the surface accepts interaction.
final
- excludeSemantics → bool
-
Whether to exclude child semantics.
final
- focusNode → FocusNode?
-
Optional focus node; one is created internally when null.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- materialInk → bool
-
When true, gestures are handled by the overlay ink well.
final
- mouseCursor → MouseCursor?
-
Cursor shown while interactive.
final
- onLongPress → VoidCallback?
-
Called when the surface is long-pressed.
final
-
onStateChanged
→ ValueChanged<
M3EInteractionState> ? -
Notified whenever the resolved interaction state changes.
final
- onTap → VoidCallback?
-
Called when the surface is tapped.
final
- pressedScale → double
-
Scale applied while pressed.
1.0disables the press scale animation.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- semanticButton → bool
-
Whether semantics treat this as a button.
final
- semanticLabel → String?
-
Accessibility label for the surface.
final
- spring → M3ESpring
-
Spring used to animate the press scale in and out.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< M3ETappable> -
Creates the mutable state for this widget.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited