CustomContextMenu class

Create a custom entry for the context menu (The menu that appears on right click). Pass it to the CodeForge class to add the custom entry to the context menu. eg:

CodeForge(
  customContextMenuItems: [
    CustomContextMenu(
       label: "Goto defenition",
       desciption: "Ctrl + Shift + .",
       onPress: ()=> goToDefinition()
    ),
    CustomContextMenu(
       label: "Code actions",
       desciption: "Ctrl + .",
       onPress: ()=> getCodeActions()
    ),
  ]
)

Constructors

CustomContextMenu({required String label, required String description, required VoidCallback onPress})
const

Properties

description String
The description for the context item. Shown at the right end of the menu.
final
hashCode int
The hash code for this object.
no setterinherited
label String
The label that shown in the context menu
final
onPress VoidCallback
The action to be performed on pressing the context menu item.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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