ContextMenuButtonItem class

The type and callback for a context menu button.

See also:

  • AdaptiveTextSelectionToolbar, which can take a list of ContextMenuButtonItems and create a platform-specific context menu with the indicated buttons.
Annotations

Constructors

ContextMenuButtonItem({required VoidCallback? onPressed, ContextMenuButtonType type = ContextMenuButtonType.custom, String? label})
Creates a const instance of ContextMenuButtonItem.
const

Properties

hashCode int
The hash code for this object.
no setteroverride
label String?
The label to display on the button.
final
onPressed VoidCallback?
The callback to be called when the button is pressed.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type ContextMenuButtonType
The type of button this represents.
final

Methods

copyWith({VoidCallback? onPressed, ContextMenuButtonType? type, String? label}) ContextMenuButtonItem
Creates a new ContextMenuButtonItem with the provided parameters overridden.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override