MenuItemButton constructor

const MenuItemButton({
  1. Key? key,
  2. VoidCallback? onPressed,
  3. ValueChanged<bool>? onHover,
  4. bool requestFocusOnHover = true,
  5. ValueChanged<bool>? onFocusChange,
  6. FocusNode? focusNode,
  7. bool autofocus = false,
  8. MenuSerializableShortcut? shortcut,
  9. String? semanticsLabel,
  10. ButtonStyle? style,
  11. MaterialStatesController? statesController,
  12. Clip clipBehavior = Clip.none,
  13. Widget? leadingIcon,
  14. Widget? trailingIcon,
  15. bool closeOnActivate = true,
  16. Axis overflowAxis = Axis.horizontal,
  17. Widget? child,
})

Creates a const MenuItemButton.

The child attribute is required.

Implementation

const MenuItemButton({
  super.key,
  this.onPressed,
  this.onHover,
  this.requestFocusOnHover = true,
  this.onFocusChange,
  this.focusNode,
  this.autofocus = false,
  this.shortcut,
  this.semanticsLabel,
  this.style,
  this.statesController,
  this.clipBehavior = Clip.none,
  this.leadingIcon,
  this.trailingIcon,
  this.closeOnActivate = true,
  this.overflowAxis = Axis.horizontal,
  this.child,
});