HapticFeedback constructor

const HapticFeedback({
  1. required Widget child,
  2. HapticPattern? onTap,
  3. HapticPattern? onLongPress,
  4. HapticPattern? onDoubleTap,
  5. VoidCallback? onTapDown,
  6. VoidCallback? onTapUp,
  7. VoidCallback? onTapCancel,
  8. bool enabled = true,
  9. 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',
     );