MenuItemWithImage class
📖 Description​
The MenuItemWithImage class defines a menu item (with an image) for the Menu class. A menu item is a selectable item in the menu that executes a function when tapped/clicked. It is derived from the MenuItem class.
🆕 constructor​
Creates a new MenuItemWithImage instance.
Signature​
constructor(
  image: string,
  label: string,
  fn?: () => void,
  disabled?: boolean
): MenuItemWithImage
Parameters​
| Name | Type | Optional | Description | 
|---|---|---|---|
| image | string | No | Specifies the image. | 
| label | string | No | Specifies the label. | 
| fn | () => void | Yes | Specifies the command which is invoked when the item is selected. | 
| disabled | boolean | Yes | Specifies if the item is disabled (default is false). | 
Return value​
Returns a reference to the new MenuItemWithImage instance.