HapticButton constructor

const HapticButton({
  1. required VoidCallback onPressed,
  2. required HapticPattern pattern,
  3. required Widget child,
  4. VoidCallback? onHapticComplete,
  5. OnHapticButtonError? onError,
  6. bool enabled = true,
  7. ButtonStyle? style,
  8. Duration hapticTimeout = const Duration(seconds: 5),
  9. Key? key,
})

Creates a haptic button with comprehensive error handling

Implementation

const HapticButton({
  required this.onPressed,
  required this.pattern,
  required this.child,
  this.onHapticComplete,
  this.onError,
  this.enabled = true,
  this.style,
  this.hapticTimeout = const Duration(seconds: 5),
  super.key,
});