CPDFContextMenuItem<T> class
Represents a context menu item in the PDF viewer.
T is the enum type of the menu key,
such as CPDFScreenShotMenuKey, CPDFViewModeTextSelectKey, etc.
Constructors
-
CPDFContextMenuItem(T key, {List<
String> ? subItems, String identifier = '', String title = '', String icon = '', CPDFContextMenuShowType showType = CPDFContextMenuShowType.text}) -
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- icon → String
-
The icon asset path for the menu item.
only support Android platform.
final
- identifier → String
-
Identifier used to distinguish multiple custom menu items.
final
- key → T
-
The unique key identifying this menu item.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showType → CPDFContextMenuShowType
-
Determines whether the menu item is displayed as text or icon.
final
-
subItems
→ List<
String> ? -
Optional list of sub-menu item titles.
final
- title → String
-
The displayed title of the menu item.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts the menu item into a JSON-serializable map.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
of<
T> (T key, {List< String> ? subItems}) → CPDFContextMenuItem<T> - Creates a menu item with only a key and optional sub-items.