MenuAnchor constructor

const MenuAnchor({
  1. Key? key,
  2. MenuController? controller,
  3. FocusNode? childFocusNode,
  4. MenuStyle? style,
  5. Offset? alignmentOffset = Offset.zero,
  6. LayerLink? layerLink,
  7. Clip clipBehavior = Clip.hardEdge,
  8. @Deprecated('Use consumeOutsideTap instead. ' 'This feature was deprecated after v3.16.0-8.0.pre.') bool anchorTapClosesMenu = false,
  9. bool consumeOutsideTap = false,
  10. VoidCallback? onOpen,
  11. VoidCallback? onClose,
  12. bool crossAxisUnconstrained = true,
  13. required List<Widget> menuChildren,
  14. MenuAnchorChildBuilder? builder,
  15. Widget? child,
})

Creates a const MenuAnchor.

The menuChildren argument is required.

Implementation

const MenuAnchor({
  super.key,
  this.controller,
  this.childFocusNode,
  this.style,
  this.alignmentOffset = Offset.zero,
  this.layerLink,
  this.clipBehavior = Clip.hardEdge,
  @Deprecated(
    'Use consumeOutsideTap instead. '
    'This feature was deprecated after v3.16.0-8.0.pre.',
  )
  this.anchorTapClosesMenu = false,
  this.consumeOutsideTap = false,
  this.onOpen,
  this.onClose,
  this.crossAxisUnconstrained = true,
  required this.menuChildren,
  this.builder,
  this.child,
});