DropdownSearch<T>.multiSelection constructor

DropdownSearch<T>.multiSelection({
  1. Key? key,
  2. AutovalidateMode? autoValidateMode = AutovalidateMode.disabled,
  3. Mode mode = Mode.DIALOG,
  4. @Deprecated('Use labelText prop from dropdownSearchDecoration') String? label,
  5. @Deprecated('Use hintText prop from dropdownSearchDecoration') String? hint,
  6. bool isFilteredOnline = false,
  7. Widget? popupTitle,
  8. List<T>? items,
  9. DropdownSearchOnFind<T>? onFind,
  10. DropdownSearchPopupItemBuilder<T>? popupItemBuilder,
  11. bool showSearchBox = false,
  12. bool showClearButton = false,
  13. Color? popupBackgroundColor,
  14. bool enabled = true,
  15. double? maxHeight,
  16. DropdownSearchFilterFn<T>? filterFn,
  17. DropdownSearchItemAsString<T>? itemAsString,
  18. bool showSelectedItems = false,
  19. DropdownSearchCompareFn<T>? compareFn,
  20. InputDecoration? dropdownSearchDecoration,
  21. EmptyBuilder? emptyBuilder,
  22. LoadingBuilder? loadingBuilder,
  23. ErrorBuilder? errorBuilder,
  24. double? dialogMaxWidth,
  25. Widget? clearButton,
  26. IconButtonBuilder? clearButtonBuilder,
  27. double? clearButtonSplashRadius,
  28. Widget? dropDownButton,
  29. IconButtonBuilder? dropdownButtonBuilder,
  30. double? dropdownButtonSplashRadius,
  31. bool showAsSuffixIcons = false,
  32. bool dropdownBuilderSupportsNullItem = false,
  33. ShapeBorder? popupShape,
  34. DropdownSearchPopupItemEnabled<T>? popupItemDisabled,
  35. Color? popupBarrierColor,
  36. VoidCallback? onPopupDismissed,
  37. Duration? searchDelay,
  38. FavoriteItemsBuilder<T>? favoriteItemBuilder,
  39. FavoriteItems<T>? favoriteItems,
  40. bool showFavoriteItems = false,
  41. MainAxisAlignment? favoriteItemsAlignment = MainAxisAlignment.start,
  42. PopupSafeArea popupSafeArea = const PopupSafeArea(),
  43. TextFieldProps? searchFieldProps,
  44. ScrollbarProps? scrollbarProps,
  45. bool popupBarrierDismissible = true,
  46. TextStyle? dropdownSearchBaseStyle,
  47. TextAlign? dropdownSearchTextAlign,
  48. TextAlignVertical? dropdownSearchTextAlignVertical,
  49. List<T> selectedItems = const [],
  50. FormFieldSetter<List<T>>? onSaved,
  51. ValueChanged<List<T>>? onChange,
  52. BeforeChangeMultiSelection<T>? onBeforeChange,
  53. FormFieldValidator<List<T>>? validator,
  54. DropdownSearchBuilderMultiSelection<T>? dropdownBuilder,
  55. OnItemAdded<T>? popupOnItemAdded,
  56. OnItemRemoved<T>? popupOnItemRemoved,
  57. DropdownSearchPopupItemBuilder<T>? popupSelectionWidget,
  58. ValidationMultiSelectionBuilder<T?>? popupValidationMultiSelectionWidget,
  59. double popupElevation = 8,
  60. SelectionListViewProps selectionListViewProps = const SelectionListViewProps(),
  61. FocusNode? focusNode,
  62. PositionCallback? positionCallback,
})

Implementation

DropdownSearch.multiSelection({
  Key? key,
  this.autoValidateMode = AutovalidateMode.disabled,
  this.mode = Mode.DIALOG,
  @Deprecated('Use labelText prop from dropdownSearchDecoration') this.label,
  @Deprecated('Use hintText prop from dropdownSearchDecoration') this.hint,
  this.isFilteredOnline = false,
  this.popupTitle,
  this.items,
  this.onFind,
  this.popupItemBuilder,
  this.showSearchBox = false,
  this.showClearButton = false,
  this.popupBackgroundColor,
  this.enabled = true,
  this.maxHeight,
  this.filterFn,
  this.itemAsString,
  this.showSelectedItems = false,
  this.compareFn,
  this.dropdownSearchDecoration,
  this.emptyBuilder,
  this.loadingBuilder,
  this.errorBuilder,
  this.dialogMaxWidth,
  this.clearButton,
  this.clearButtonBuilder,
  this.clearButtonSplashRadius,
  this.dropDownButton,
  this.dropdownButtonBuilder,
  this.dropdownButtonSplashRadius,
  this.showAsSuffixIcons = false,
  this.dropdownBuilderSupportsNullItem = false,
  this.popupShape,
  this.popupItemDisabled,
  this.popupBarrierColor,
  this.onPopupDismissed,
  this.searchDelay,
  this.favoriteItemBuilder,
  this.favoriteItems,
  this.showFavoriteItems = false,
  this.favoriteItemsAlignment = MainAxisAlignment.start,
  this.popupSafeArea = const PopupSafeArea(),
  TextFieldProps? searchFieldProps,
  this.scrollbarProps,
  this.popupBarrierDismissible = true,
  this.dropdownSearchBaseStyle,
  this.dropdownSearchTextAlign,
  this.dropdownSearchTextAlignVertical,
  this.selectedItems = const [],
  FormFieldSetter<List<T>>? onSaved,
  ValueChanged<List<T>>? onChange,
  BeforeChangeMultiSelection<T>? onBeforeChange,
  FormFieldValidator<List<T>>? validator,
  DropdownSearchBuilderMultiSelection<T>? dropdownBuilder,
  this.popupOnItemAdded,
  this.popupOnItemRemoved,
  this.popupSelectionWidget,
  this.popupValidationMultiSelectionWidget,
  this.popupElevation = 8,
  this.selectionListViewProps = const SelectionListViewProps(),
  this.focusNode,
  this.positionCallback,
})  : assert(!showSelectedItems || T == String || compareFn != null),
      this.searchFieldProps = searchFieldProps ?? TextFieldProps(),
      this.onChangedMultiSelection = onChange,
      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,
      super(key: key);