DropdownSearch<T> constructor

DropdownSearch<T>({
  1. Key? key,
  2. FormFieldSetter<T>? onSaved,
  3. FormFieldValidator<T>? validator,
  4. AutovalidateMode? autoValidateMode = AutovalidateMode.disabled,
  5. ValueChanged<T?>? onChanged,
  6. List<T> items = const [],
  7. T? selectedItem,
  8. DropdownSearchOnFind<T>? asyncItems,
  9. DropdownSearchBuilder<T>? dropdownBuilder,
  10. DropDownDecoratorProps dropdownDecoratorProps = const DropDownDecoratorProps(),
  11. ClearButtonProps clearButtonProps = const ClearButtonProps(),
  12. DropdownButtonProps dropdownButtonProps = const DropdownButtonProps(),
  13. bool enabled = true,
  14. DropdownSearchFilterFn<T>? filterFn,
  15. DropdownSearchItemAsString<T>? itemAsString,
  16. DropdownSearchCompareFn<T>? compareFn,
  17. BeforeChange<T>? onBeforeChange,
  18. BeforePopupOpening<T>? onBeforePopupOpening,
  19. PopupProps<T> popupProps = const PopupProps.menu(),
})

Implementation

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