HcDropdownSearch<T> constructor

HcDropdownSearch<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. HcDropdownSearchOnFind<T>? asyncItems,
  9. HcDropdownSearchBuilder<T>? dropdownBuilder,
  10. HcDropDownDecoratorProps dropdownDecoratorProps = const HcDropDownDecoratorProps(),
  11. HcClearButtonProps clearButtonProps = const HcClearButtonProps(),
  12. HcDropdownButtonProps dropdownButtonProps = const HcDropdownButtonProps(),
  13. bool enabled = true,
  14. HcDropdownSearchFilterFunction<T>? filterFn,
  15. HcDropdownSearchItemAsString<T>? itemAsString,
  16. HcDropdownSearchCompareFunction<T>? compareFn,
  17. BeforeChange<T>? onBeforeChange,
  18. BeforePopupOpening<T>? onBeforePopupOpening,
  19. PopupProps<T> popupProps = const PopupProps.menu(),
})

Implementation

HcDropdownSearch({
  Key? key,
  this.onSaved,
  this.validator,
  this.autoValidateMode = AutovalidateMode.disabled,
  this.onChanged,
  this.items = const [],
  this.selectedItem,
  this.asyncItems,
  this.dropdownBuilder,
  this.dropdownDecoratorProps = const HcDropDownDecoratorProps(),
  this.clearButtonProps = const HcClearButtonProps(),
  this.dropdownButtonProps = const HcDropdownButtonProps(),
  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,
),
      popupProps = HcPopupPropsMultiSelection.from(popupProps),
      isMultiSelectionMode = false,
      dropdownBuilderMultiSelection = null,
      validatorMultiSelection = null,
      onBeforeChangeMultiSelection = null,
      selectedItems = const [],
      onSavedMultiSelection = null,
      onChangedMultiSelection = null,
      onBeforePopupOpeningMultiSelection = null,
      super(key: key);