ContextMenuButtonItem constructor
- required VoidCallback? onPressed,
- ContextMenuButtonType? type,
- ContextMenuButtonKind? kind,
- String? label,
Creates a const instance of ContextMenuButtonItem.
At most one of kind or type may be given. If neither is given, the
button is a ContextMenuButtonKind.custom button.
Implementation
const ContextMenuButtonItem({
required this.onPressed,
ContextMenuButtonType? type,
ContextMenuButtonKind? kind,
this.label,
}) : assert(type == null || kind == null, 'Only one of type and kind may be given.'),
_type = type,
_kind = kind;