MenuModel<T> constructor

MenuModel<T>(
  1. List<MenuItemGroup<T>> itemGroups, {
  2. Icon? icon,
  3. int? width,
  4. String tooltipText = '',
})

Creates a menu model with the given menu groups list.

If icon is given, it will appear on the button that opens the menu.

Implementation

MenuModel(List<MenuItemGroup<T>> itemGroups,
    {this.icon, int? width, this.tooltipText = ''})
    : itemGroups = List<MenuItemGroup<T>>.unmodifiable(itemGroups) {
  this.width = width;
}