DropdownSearch<T>.multiSelection constructor

DropdownSearch<T>.multiSelection({
  1. Key? key,
  2. AutovalidateMode? autoValidateMode = AutovalidateMode.disabled,
  3. List<T> items = const [],
  4. DropdownSearchOnFind<T>? asyncItems,
  5. DropDownDecoratorProps dropdownDecoratorProps = const DropDownDecoratorProps(),
  6. ClearButtonProps clearButtonProps = const ClearButtonProps(),
  7. DropdownButtonProps dropdownButtonProps = const DropdownButtonProps(),
  8. bool enabled = true,
  9. DropdownSearchFilterFn<T>? filterFn,
  10. DropdownSearchItemAsString<T>? itemAsString,
  11. DropdownSearchCompareFn<T>? compareFn,
  12. List<T> selectedItems = const [],
  13. PopupPropsMultiSelection<T> popupProps = const PopupPropsMultiSelection.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. DropdownSearchBuilderMultiSelection<T>? dropdownBuilder,
})

Implementation

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