Pressable constructor

const Pressable({
  1. Key? key,
  2. required Widget child,
  3. bool enabled = true,
  4. bool enableFeedback = false,
  5. VoidCallback? onPress,
  6. HitTestBehavior hitTestBehavior = HitTestBehavior.opaque,
  7. VoidCallback? onLongPress,
  8. ValueChanged<bool>? onFocusChange,
  9. bool autofocus = false,
  10. FocusNode? focusNode,
  11. FocusOnKeyCallback? onKey,
  12. FocusOnKeyEventCallback? onKeyEvent,
  13. Duration unpressDelay = kDefaultAnimationDuration,
})

Implementation

const Pressable({
  super.key,
  required super.child,
  super.enabled,
  super.enableFeedback,
  super.onPress,
  super.hitTestBehavior,
  super.onLongPress,
  super.onFocusChange,
  super.autofocus,
  super.focusNode,
  super.onKey,
  super.onKeyEvent,
  super.unpressDelay = kDefaultAnimationDuration,
});