IOSSystemContextMenuItemCustom class

Creates an instance of IOSSystemContextMenuItem for custom action buttons defined by the developer.

Only supported on iOS 16.0 and above.

The title and onPressed callback must be provided.

This example shows how to add custom menu items to the iOS system context menu.
link

To create a local project with this code sample, run:
flutter create --sample=widgets.IOSSystemContextMenuItemCustom.1 mysample

See also:

Inheritance
Mixed-in types
Annotations

Constructors

IOSSystemContextMenuItemCustom.new({required String title, required VoidCallback onPressed})
Creates an instance of IOSSystemContextMenuItemCustom.
const

Properties

hashCode int
The hash code for this object.
no setteroverride
onPressed VoidCallback
The callback that is called when the button is pressed.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
title String
The text to display to the user.
final

Methods

debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
override
getData(WidgetsLocalizations localizations) IOSSystemContextMenuItemData
Returns the representation of this class used by method channels.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode.
inherited

Operators

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