HapticFeedbackType enum
Defines the type of haptic feedback to trigger when the button is tapped.
Each type corresponds to a different intensity or pattern of haptic feedback provided by the device's haptic engine.
Example
SInkButton(
hapticFeedbackType: HapticFeedbackType.mediumImpact,
onTap: (_) => print('Tapped!'),
child: Text('Button'),
)
Values
- lightImpact → const HapticFeedbackType
-
A light impact haptic feedback.
Provides a subtle tap sensation, suitable for minor interactions.
- mediumImpact → const HapticFeedbackType
-
A medium impact haptic feedback.
Provides a moderate tap sensation, suitable for standard button presses.
- heavyImpact → const HapticFeedbackType
-
A heavy impact haptic feedback.
Provides a strong tap sensation, suitable for significant actions.
- selectionClick → const HapticFeedbackType
-
A selection click haptic feedback.
Provides feedback similar to picking an item from a list or picker.
- vibrate → const HapticFeedbackType
-
A vibration haptic feedback.
Provides a longer vibration pattern, suitable for alerts or errors.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
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 -
The equality operator.
inherited
Constants
-
values
→ const List<
HapticFeedbackType> - A constant List of the values in this enum, in order of their declaration.