MenuItemGroupWithSelection<SelectionItemType> constructor

MenuItemGroupWithSelection<SelectionItemType>({
  1. required List<SelectableMenuItem<SelectionItemType>> items,
  2. required SelectionModel<SelectionItemType> selectionModel,
  3. String? label,
  4. bool? shouldCloseMenuOnSelection,
})

Implementation

MenuItemGroupWithSelection(
    {required List<SelectableMenuItem<SelectionItemType>> items,
    required this.selectionModel,
    String? label,
    bool? shouldCloseMenuOnSelection})
    : shouldCloseMenuOnSelection = shouldCloseMenuOnSelection ??
          selectionModel is! MultiSelectionModel,
      itemsRole = (selectionModel.isSingleSelect)
          ? 'menuitemradio'
          : 'menuitemcheckbox',
      super(items, label);