MenuAnchor constructor

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