ContextMenuButtonItem constructor

const ContextMenuButtonItem({
  1. required VoidCallback? onPressed,
  2. ContextMenuButtonType? type,
  3. ContextMenuButtonKind? kind,
  4. 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;