copyWith method
- VoidCallback? onPressed,
- ContextMenuButtonType? type,
- String? label,
Creates a new ContextMenuButtonItem with the provided parameters overridden.
Implementation
ContextMenuButtonItem copyWith({
VoidCallback? onPressed,
ContextMenuButtonType? type,
String? label,
}) {
return ContextMenuButtonItem(
onPressed: onPressed ?? this.onPressed,
type: type ?? this.type,
label: label ?? this.label,
);
}