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. Menu? submenu,
  10. void onClick(
    1. MenuItem menuItem
    )?,
  11. void onHighlight(
    1. MenuItem menuItem
    )?,
  12. void onLoseHighlight(
    1. MenuItem menuItem
    )?,
})

Implementation

MenuItem({
  this.key,
  this.type = 'normal',
  String? label,
  this.sublabel,
  String? toolTip,
  this.icon,
  bool? checked,
  bool disabled = false,
  this.submenu,
  this.onClick,
  this.onHighlight,
  this.onLoseHighlight,
}) : id = _generateMenuItemId(),
     _label = label,
     _toolTip = toolTip,
     _checked = checked,
     _disabled = disabled;