ContextMenuItem class

Class that represent an item of the ContextMenu.

Constructors

ContextMenuItem({dynamic id, @Deprecated("Use id instead") int? androidId, @Deprecated("Use id instead") String? iosId, required String title, dynamic action()?})

Properties

action ↔ dynamic Function()?
Menu item action that will be called when an user clicks on it.
getter/setter pair
androidId int?
Use id instead.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
id ↔ dynamic
Menu item ID. It cannot be null and it can be a String or an int.
getter/setter pair
iosId String?
Use id instead.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
title String
Menu item title.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts instance to a map.
toMap() Map<String, dynamic>
Converts instance to a map.
toString() String
A string representation of this object.
override

Operators

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

Static Methods

fromMap(Map<String, dynamic>? map) ContextMenuItem?
Gets a possible ContextMenuItem instance from a Map value.