CustomDropdown<T>.multiSelectSearch constructor

CustomDropdown<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. _HintBuilder? hintBuilder,
  13. CustomDropdownDecoration? decoration,
  14. _HeaderListBuilder<T>? headerListBuilder,
  15. String? noResultFoundText,
  16. _NoResultFoundBuilder? noResultFoundBuilder,
  17. String? hintText,
  18. String? searchHintText,
  19. bool validateOnChange = true,
  20. bool canCloseOutsideBounds = true,
  21. bool hideSelectedFieldWhenExpanded = false,
  22. int maxlines = 1,
  23. double? overlayHeight,
  24. EdgeInsets? closedHeaderPadding,
  25. EdgeInsets? expandedHeaderPadding,
  26. EdgeInsets? itemsListPadding,
  27. EdgeInsets? listItemPadding,
  28. bool enabled = true,
  29. CustomDropdownDisabledDecoration? disabledDecoration,
  30. bool closeDropDownOnClearFilterSearch = false,
})

Implementation

CustomDropdown.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.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.closedHeaderPadding,
  this.expandedHeaderPadding,
  this.itemsListPadding,
  this.listItemPadding,
  this.enabled = true,
  this.disabledDecoration,
  this.closeDropDownOnClearFilterSearch = 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;