PopupMenuItem<T> constructor
Null safety
- {Key? key,
- T? value,
- VoidCallback? onTap,
- bool enabled = true,
- double height = kMinInteractiveDimension,
- EdgeInsets? padding,
- TextStyle? textStyle,
- MouseCursor? mouseCursor,
- required Widget? child}
Creates an item for a popup menu.
By default, the item is enabled.
The enabled
and height
arguments must not be null.
Implementation
const PopupMenuItem({
super.key,
this.value,
this.onTap,
this.enabled = true,
this.height = kMinInteractiveDimension,
this.padding,
this.textStyle,
this.mouseCursor,
required this.child,
}) : assert(enabled != null),
assert(height != null);