CustomDropdown<T>.multiSelectSearchRequest constructor

const CustomDropdown<T>.multiSelectSearchRequest({
  1. Key? key,
  2. Future<List<T>> futureRequest(
    1. String
    )?,
  3. required dynamic onListChanged(
    1. List<T>
    )?,
  4. PaginatedSearchRequest<T>? paginatedRequest,
  5. int pageSize = 20,
  6. Widget? loadMoreIndicator,
  7. MultiSelectController<T>? multiSelectController,
  8. Duration? futureRequestDelay,
  9. int searchRequestMinChars = 0,
  10. List<T>? initialItems,
  11. List<T>? items,
  12. SingleSelectController<T?>? controller,
  13. ScrollController? itemsScrollController,
  14. OverlayPortalController? overlayController,
  15. dynamic visibility(
    1. bool
    )?,
  16. String? hintText,
  17. String? labelText,
  18. Widget? label,
  19. CustomDropdownDecoration? decoration,
  20. String? searchHintText,
  21. String? noResultFoundText,
  22. _HeaderListBuilder<T>? headerListBuilder,
  23. _ListItemBuilder<T>? listItemBuilder,
  24. _HintBuilder? hintBuilder,
  25. _NoResultFoundBuilder? noResultFoundBuilder,
  26. String? listValidator(
    1. List<T>
    )?,
  27. bool validateOnChange = true,
  28. int maxlines = 1,
  29. TextAlign textAlign = TextAlign.start,
  30. double? overlayHeight,
  31. Widget? searchRequestLoadingIndicator,
  32. EdgeInsets? closedHeaderPadding,
  33. EdgeInsets? expandedHeaderPadding,
  34. EdgeInsets? itemsListPadding,
  35. EdgeInsets? listItemPadding,
  36. bool canCloseOutsideBounds = true,
  37. bool hideSelectedFieldWhenExpanded = false,
  38. bool enabled = true,
  39. bool canClearSelection = false,
  40. bool selectOnItemTap = true,
  41. CustomDropdownAnimation animation = const CustomDropdownAnimation(),
  42. bool initiallyOpen = false,
  43. bool autofocusOnSearch = false,
  44. DropdownOverlayDirection overlayDirection = DropdownOverlayDirection.auto,
  45. CustomDropdownDisabledDecoration? disabledDecoration,
  46. bool closeDropDownOnClearFilterSearch = false,
})

Implementation

const CustomDropdown.multiSelectSearchRequest({
  super.key,
  this.futureRequest,
  required this.onListChanged,
  this.paginatedRequest,
  this.pageSize = 20,
  this.loadMoreIndicator,
  this.multiSelectController,
  this.futureRequestDelay,
  this.searchRequestMinChars = 0,
  this.initialItems,
  this.items,
  this.controller,
  this.itemsScrollController,
  this.overlayController,
  this.visibility,
  this.hintText,
  this.labelText,
  this.label,
  this.decoration,
  this.searchHintText,
  this.noResultFoundText,
  this.headerListBuilder,
  this.listItemBuilder,
  this.hintBuilder,
  this.noResultFoundBuilder,
  this.listValidator,
  this.validateOnChange = true,
  this.maxlines = 1,
  this.textAlign = TextAlign.start,
  this.overlayHeight,
  this.searchRequestLoadingIndicator,
  this.closedHeaderPadding,
  this.expandedHeaderPadding,
  this.itemsListPadding,
  this.listItemPadding,
  this.canCloseOutsideBounds = true,
  this.hideSelectedFieldWhenExpanded = false,
  this.enabled = true,
  this.canClearSelection = false,
  this.selectOnItemTap = true,
  this.animation = const CustomDropdownAnimation(),
  this.initiallyOpen = false,
  this.autofocusOnSearch = false,
  this.overlayDirection = DropdownOverlayDirection.auto,
  this.disabledDecoration,
  this.closeDropDownOnClearFilterSearch = false,
})  : assert(
        initialItems == null || multiSelectController == null,
        'Only one of initialItems or controller can be specified at a time',
      ),
      assert(
        (futureRequest == null) != (paginatedRequest == null),
        'Provide exactly one of futureRequest or paginatedRequest',
      ),
      _searchType = _SearchType.onRequestData,
      _dropdownType = _DropdownType.multipleSelect,
      initialItem = null,
      onChanged = null,
      headerBuilder = null,
      excludeSelected = false,
      validator = null;