DropdownFlutter<T>.multiSelectSearch constructor

DropdownFlutter<T>.multiSelectSearch({
  1. Key? key,
  2. required List<T>? items,
  3. required dynamic onListChanged(
    1. List<T>
    )?,
  4. MultiSelectController<T>? multiSelectController,
  5. List<T>? initialItems,
  6. SingleSelectController<T?>? controller,
  7. dynamic visibility(
    1. bool
    )?,
  8. ScrollController? itemsScrollController,
  9. OverlayPortalController? overlayController,
  10. String? listValidator(
    1. List<T>
    )?,
  11. _ListItemBuilder<T>? listItemBuilder,
  12. _SelectAllListItemBuilder<T>? selectAllItemBuilder,
  13. _HintBuilder? hintBuilder,
  14. CustomDropdownDecoration? decoration,
  15. _HeaderListBuilder<T>? headerListBuilder,
  16. String? noResultFoundText,
  17. _NoResultFoundBuilder? noResultFoundBuilder,
  18. String? hintText,
  19. String? searchHintText,
  20. bool validateOnChange = true,
  21. bool canCloseOutsideBounds = true,
  22. bool hideSelectedFieldWhenExpanded = false,
  23. int maxlines = 1,
  24. double? overlayHeight,
  25. double? overlayWidth,
  26. EdgeInsets? closedHeaderPadding,
  27. EdgeInsets? expandedHeaderPadding,
  28. EdgeInsets? itemsListPadding,
  29. EdgeInsets? listItemPadding,
  30. bool enabled = true,
  31. CustomDropdownDisabledDecoration? disabledDecoration,
  32. bool closeDropDownOnClearFilterSearch = false,
  33. bool shouldResetSelection = false,
  34. dynamic onApplyButtonPressed(
    1. List<T>
    )?,
  35. _ApplyButtonBuilder? applyButtonBuilder,
  36. bool overrideShowHintTextWhenExpanded = false,
})

Implementation

DropdownFlutter.multiSelectSearch({
  super.key,
  required this.items,
  required this.onListChanged,
  this.multiSelectController,
  this.initialItems,
  this.controller,
  this.visibility,
  this.itemsScrollController,
  this.overlayController,
  this.listValidator,
  this.listItemBuilder,
  this.selectAllItemBuilder,
  this.hintBuilder,
  this.decoration,
  this.headerListBuilder,
  this.noResultFoundText,
  this.noResultFoundBuilder,
  this.hintText,
  this.searchHintText,
  this.validateOnChange = true,
  this.canCloseOutsideBounds = true,
  this.hideSelectedFieldWhenExpanded = false,
  this.maxlines = 1,
  this.overlayHeight,
  this.overlayWidth,
  this.closedHeaderPadding,
  this.expandedHeaderPadding,
  this.itemsListPadding,
  this.listItemPadding,
  this.enabled = true,
  this.disabledDecoration,
  this.closeDropDownOnClearFilterSearch = false,
  this.shouldResetSelection = false,
  this.onApplyButtonPressed,
  this.applyButtonBuilder,
  this.overrideShowHintTextWhenExpanded = false,
})  : assert(
        initialItems == null || multiSelectController == null,
        'Only one of initialItems or controller can be specified at a time',
      ),
      assert(
        initialItems == null ||
            initialItems.isEmpty ||
            initialItems.any((e) => items!.contains(e)),
        'Initial items must match with the items in the items list.',
      ),
      assert(
        multiSelectController == null ||
            multiSelectController.value.isEmpty ||
            multiSelectController.value.any((e) => items!.contains(e)),
        'Controller value must match with one of the item in items list.',
      ),
      _searchType = _SearchType.onListData,
      _dropdownType = _DropdownType.multipleSelect,
      initialItem = null,
      onChanged = null,
      validator = null,
      excludeSelected = false,
      headerBuilder = null,
      futureRequest = null,
      futureRequestDelay = null,
      searchRequestLoadingIndicator = null;