handleSelectItemTrigger method

void handleSelectItemTrigger(
  1. MenuItem item,
  2. MenuItemGroup group,
  3. UIEvent event
)

Called when a material select item is triggered, whether through keypress or through click.

Implementation

void handleSelectItemTrigger(
    MenuItem item, MenuItemGroup group, UIEvent event) {
  if (!item.enabled) return;

  if (item.hasSubMenu) {
    _openSubMenu(item, isOpenedByKeyboard: event is KeyboardEvent);
  } else {
    select(event, item, group);
  }
}