MenuItem constructor

MenuItem({
  1. String? key,
  2. String type = 'normal',
  3. String? label,
  4. String? sublabel,
  5. String? toolTip,
  6. String? icon,
  7. bool? checked,
  8. bool disabled = false,
  9. String? shortcutKey,
  10. ShortcutModifiers? shortcutModifiers,
  11. Menu? submenu,
  12. void onClick(
    1. MenuItem menuItem
    )?,
  13. void onHighlight(
    1. MenuItem menuItem
    )?,
  14. void onLoseHighlight(
    1. MenuItem menuItem
    )?,
})

Implementation

MenuItem({
  this.key,
  this.type = 'normal',
  this.label,
  this.sublabel,
  this.toolTip,
  this.icon,
  this.checked,
  this.disabled = false,
  this.shortcutKey,
  this.shortcutModifiers,
  this.submenu,
  this.onClick,
  this.onHighlight,
  this.onLoseHighlight,
}) : id = _generateMenuItemId();