HapticFeedback constructor
const
HapticFeedback({
- required Widget child,
- HapticPattern? onTap,
- HapticPattern? onLongPress,
- HapticPattern? onDoubleTap,
- VoidCallback? onTapDown,
- VoidCallback? onTapUp,
- VoidCallback? onTapCancel,
- bool enabled = true,
- Key? key,
Creates a haptic feedback wrapper
Implementation
const HapticFeedback({
required this.child,
this.onTap,
this.onLongPress,
this.onDoubleTap,
this.onTapDown,
this.onTapUp,
this.onTapCancel,
this.enabled = true,
super.key,
}) : assert(
onTap != null || onLongPress != null || onDoubleTap != null,
'At least one haptic pattern must be provided',
);