HcDropdownSearch<T>.multiSelection constructor

HcDropdownSearch<T>.multiSelection({
  1. Key? key,
  2. AutovalidateMode? autoValidateMode = AutovalidateMode.disabled,
  3. List<T> items = const [],
  4. HcDropdownSearchOnFind<T>? asyncItems,
  5. HcDropDownDecoratorProps dropdownDecoratorProps = const HcDropDownDecoratorProps(),
  6. HcClearButtonProps clearButtonProps = const HcClearButtonProps(),
  7. HcDropdownButtonProps dropdownButtonProps = const HcDropdownButtonProps(),
  8. bool enabled = true,
  9. HcDropdownSearchFilterFunction<T>? filterFn,
  10. HcDropdownSearchItemAsString<T>? itemAsString,
  11. HcDropdownSearchCompareFunction<T>? compareFn,
  12. List<T> selectedItems = const [],
  13. HcPopupPropsMultiSelection<T> popupProps = const HcPopupPropsMultiSelection.menu(),
  14. FormFieldSetter<List<T>>? onSaved,
  15. ValueChanged<List<T>>? onChanged,
  16. BeforeChangeMultiSelection<T>? onBeforeChange,
  17. BeforePopupOpeningMultiSelection<T>? onBeforePopupOpening,
  18. FormFieldValidator<List<T>>? validator,
  19. HcDropdownSearchBuilderMultiSelection<T>? dropdownBuilder,
})

Implementation

HcDropdownSearch.multiSelection({
  Key? key,
  this.autoValidateMode = AutovalidateMode.disabled,
  this.items = const [],
  this.asyncItems,
  this.dropdownDecoratorProps = const HcDropDownDecoratorProps(),
  this.clearButtonProps = const HcClearButtonProps(),
  this.dropdownButtonProps = const HcDropdownButtonProps(),
  this.enabled = true,
  this.filterFn,
  this.itemAsString,
  this.compareFn,
  this.selectedItems = const [],
  this.popupProps = const HcPopupPropsMultiSelection.menu(),
  FormFieldSetter<List<T>>? onSaved,
  ValueChanged<List<T>>? onChanged,
  BeforeChangeMultiSelection<T>? onBeforeChange,
  BeforePopupOpeningMultiSelection<T>? onBeforePopupOpening,
  FormFieldValidator<List<T>>? validator,
  HcDropdownSearchBuilderMultiSelection<T>? dropdownBuilder,
})  : assert(
!popupProps.showSelectedItems || T == String || compareFn != null,
),
      onChangedMultiSelection = onChanged,
      onBeforePopupOpeningMultiSelection = onBeforePopupOpening,
      onSavedMultiSelection = onSaved,
      onBeforeChangeMultiSelection = onBeforeChange,
      validatorMultiSelection = validator,
      dropdownBuilderMultiSelection = dropdownBuilder,
      isMultiSelectionMode = true,
      dropdownBuilder = null,
      validator = null,
      onBeforeChange = null,
      selectedItem = null,
      onSaved = null,
      onChanged = null,
      onBeforePopupOpening = null,
      super(key: key);