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. MenuSerializableShortcut? shortcut,
  8. ButtonStyle? style,
  9. MaterialStatesController? statesController,
  10. Clip clipBehavior = Clip.none,
  11. Widget? leadingIcon,
  12. Widget? trailingIcon,
  13. bool closeOnActivate = true,
  14. required 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.shortcut,
  this.style,
  this.statesController,
  this.clipBehavior = Clip.none,
  this.leadingIcon,
  this.trailingIcon,
  this.closeOnActivate = true,
  required this.child,
});