CupertinoMenuAnchor constructor

const CupertinoMenuAnchor({
  1. Key? key,
  2. MenuController? controller,
  3. VoidCallback? onOpen,
  4. VoidCallback? onClose,
  5. CupertinoMenuAnimationStatusChangedCallback? onAnimationStatusChanged,
  6. BoxConstraints? constraints,
  7. bool constrainCrossAxis = false,
  8. bool consumeOutsideTaps = false,
  9. bool enableSwipe = true,
  10. bool enableLongPressToOpen = false,
  11. bool useRootOverlay = false,
  12. EdgeInsetsGeometry overlayPadding = const EdgeInsets.all(8),
  13. required List<Widget> menuChildren,
  14. RawMenuAnchorChildBuilder? builder,
  15. Widget? child,
  16. 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',
     );