CupertinoMenuItem constructor
- Key? key,
- required Widget child,
- Widget? subtitle,
- Widget? leading,
- double? leadingWidth,
- AlignmentGeometry? leadingMidpointAlignment,
- Widget? trailing,
- double? trailingWidth,
- AlignmentGeometry? trailingMidpointAlignment,
- EdgeInsetsGeometry? padding,
- BoxConstraints? constraints,
- bool autofocus = false,
- FocusNode? focusNode,
- ValueChanged<
bool> ? onFocusChange, - ValueChanged<
bool> ? onHover, - VoidCallback? onPressed,
- WidgetStateProperty<
BoxDecoration> ? decoration, - WidgetStateProperty<
MouseCursor> ? mouseCursor, - HitTestBehavior behavior = HitTestBehavior.opaque,
- bool requestCloseOnActivate = true,
- bool requestFocusOnHover = true,
- 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,
});