CupertinoMenuItem constructor

const CupertinoMenuItem({
  1. Key? key,
  2. required Widget child,
  3. Widget? subtitle,
  4. Widget? leading,
  5. double? leadingWidth,
  6. AlignmentGeometry? leadingMidpointAlignment,
  7. Widget? trailing,
  8. double? trailingWidth,
  9. AlignmentGeometry? trailingMidpointAlignment,
  10. EdgeInsetsGeometry? padding,
  11. BoxConstraints? constraints,
  12. bool autofocus = false,
  13. FocusNode? focusNode,
  14. ValueChanged<bool>? onFocusChange,
  15. ValueChanged<bool>? onHover,
  16. VoidCallback? onPressed,
  17. WidgetStateProperty<BoxDecoration>? decoration,
  18. WidgetStateProperty<MouseCursor>? mouseCursor,
  19. HitTestBehavior behavior = HitTestBehavior.opaque,
  20. bool requestCloseOnActivate = true,
  21. bool requestFocusOnHover = true,
  22. bool isDestructiveAction = false,
})

Creates a CupertinoMenuItem

The child parameter is required and must not be null.

Implementation

const CupertinoMenuItem({
  super.key,
  required this.child,
  this.subtitle,
  this.leading,
  this.leadingWidth,
  this.leadingMidpointAlignment,
  this.trailing,
  this.trailingWidth,
  this.trailingMidpointAlignment,
  this.padding,
  this.constraints,
  this.autofocus = false,
  this.focusNode,
  this.onFocusChange,
  this.onHover,
  this.onPressed,
  this.decoration,
  this.mouseCursor,
  this.behavior = HitTestBehavior.opaque,
  this.requestCloseOnActivate = true,
  this.requestFocusOnHover = true,
  this.isDestructiveAction = false,
});