VibeTap class
A universal gesture widget with optional vibration (haptic feedback) and debounce protection for tap events.
Example:
VibeTap(
enableVibration: true,
debounceDuration: Duration(milliseconds: 700),
onTap: () => print('Tapped safely!'),
onHover: (hovering) => print('Hovering: $hovering'),
child: Container(
padding: EdgeInsets.all(12),
color: Colors.blue,
child: Text('Tap Me', style: TextStyle(color: Colors.white)),
),
)
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- VibeTap
Constructors
-
VibeTap({Key? key, required Widget child, VoidCallback? onTap, VoidCallback? onDoubleTap, VoidCallback? onLongPress, VoidCallback? onLongPressUp, GestureTapDownCallback? onTapDown, GestureTapUpCallback? onTapUp, GestureTapCancelCallback? onTapCancel, ValueChanged<
bool> ? onHover, GestureDragStartCallback? onPanStart, GestureDragUpdateCallback? onPanUpdate, GestureDragEndCallback? onPanEnd, HitTestBehavior? behavior, bool enableVibration = true, Duration debounceDuration = const Duration(milliseconds: 500)}) -
const
Properties
- behavior → HitTestBehavior?
-
final
- child → Widget
-
final
- debounceDuration → Duration
-
Duration for debouncing taps
final
- enableVibration → bool
-
Enables/disables vibration feedback
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- onDoubleTap → VoidCallback?
-
final
-
onHover
→ ValueChanged<
bool> ? -
final
- onLongPress → VoidCallback?
-
final
- onLongPressUp → VoidCallback?
-
final
- onPanEnd → GestureDragEndCallback?
-
final
- onPanStart → GestureDragStartCallback?
-
final
- onPanUpdate → GestureDragUpdateCallback?
-
final
- onTap → VoidCallback?
-
final
- onTapCancel → VoidCallback?
-
final
- onTapDown → GestureTapDownCallback?
-
final
- onTapUp → GestureTapUpCallback?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< VibeTap> -
Creates the mutable state for this widget at a given location in the tree.
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