CupertinoMenuAnchor constructor
- Key? key,
- MenuController? controller,
- VoidCallback? onOpen,
- VoidCallback? onClose,
- CupertinoMenuAnimationStatusChangedCallback? onAnimationStatusChanged,
- BoxConstraints? constraints,
- bool constrainCrossAxis = false,
- bool consumeOutsideTaps = false,
- bool enableSwipe = true,
- bool enableLongPressToOpen = false,
- bool useRootOverlay = false,
- EdgeInsetsGeometry overlayPadding = const EdgeInsets.all(8),
- RawMenuAnchorChildBuilder? builder,
- Widget? child,
- FocusNode? childFocusNode,
Creates a CupertinoMenuAnchor.
Implementation
const CupertinoMenuAnchor({
super.key,
this.controller,
this.onOpen,
this.onClose,
this.onAnimationStatusChanged,
this.constraints,
this.constrainCrossAxis = false,
this.consumeOutsideTaps = false,
this.enableSwipe = true,
this.enableLongPressToOpen = false,
this.useRootOverlay = false,
this.overlayPadding = const EdgeInsets.all(8),
required this.menuChildren,
this.builder,
this.child,
this.childFocusNode,
}) : assert(
enableSwipe || !enableLongPressToOpen,
'enableLongPressToOpen cannot be true if enableSwipe is false',
);