DropdownFlutter<T>.searchRequest constructor

const DropdownFlutter<T>.searchRequest({
  1. Key? key,
  2. required Future<List<T>> futureRequest(
    1. String
    )?,
  3. required dynamic onChanged(
    1. T?
    )?,
  4. Duration? futureRequestDelay,
  5. T? initialItem,
  6. List<T>? items,
  7. SingleSelectController<T?>? controller,
  8. ScrollController? itemsScrollController,
  9. String? hintText,
  10. CustomDropdownDecoration? decoration,
  11. dynamic visibility(
    1. bool
    )?,
  12. OverlayPortalController? overlayController,
  13. String? searchHintText,
  14. String? noResultFoundText,
  15. _ListItemBuilder<T>? listItemBuilder,
  16. _HeaderBuilder<T>? headerBuilder,
  17. _HintBuilder? hintBuilder,
  18. _NoResultFoundBuilder? noResultFoundBuilder,
  19. String? validator(
    1. T?
    )?,
  20. bool validateOnChange = true,
  21. int maxlines = 1,
  22. double? overlayHeight,
  23. EdgeInsets? closedHeaderPadding,
  24. EdgeInsets? expandedHeaderPadding,
  25. EdgeInsets? itemsListPadding,
  26. EdgeInsets? listItemPadding,
  27. Widget? searchRequestLoadingIndicator,
  28. bool excludeSelected = true,
  29. bool canCloseOutsideBounds = true,
  30. bool hideSelectedFieldWhenExpanded = false,
  31. bool enabled = true,
  32. CustomDropdownDisabledDecoration? disabledDecoration,
  33. bool closeDropDownOnClearFilterSearch = false,
  34. bool shouldResetSelection = false,
})

Implementation

const DropdownFlutter.searchRequest({
  super.key,
  required this.futureRequest,
  required this.onChanged,
  this.futureRequestDelay,
  this.initialItem,
  this.items,
  this.controller,
  this.itemsScrollController,
  this.hintText,
  this.decoration,
  this.visibility,
  this.overlayController,
  this.searchHintText,
  this.noResultFoundText,
  this.listItemBuilder,
  this.headerBuilder,
  this.hintBuilder,
  this.noResultFoundBuilder,
  this.validator,
  this.validateOnChange = true,
  this.maxlines = 1,
  this.overlayHeight,
  this.closedHeaderPadding,
  this.expandedHeaderPadding,
  this.itemsListPadding,
  this.listItemPadding,
  this.searchRequestLoadingIndicator,
  this.excludeSelected = true,
  this.canCloseOutsideBounds = true,
  this.hideSelectedFieldWhenExpanded = false,
  this.enabled = true,
  this.disabledDecoration,
  this.closeDropDownOnClearFilterSearch = false,
  this.shouldResetSelection = false,
})  : assert(
        initialItem == null || controller == null,
        'Only one of initialItem or controller can be specified at a time',
      ),
      _searchType = _SearchType.onRequestData,
      _dropdownType = _DropdownType.singleSelect,
      initialItems = null,
      onListChanged = null,
      listValidator = null,
      headerListBuilder = null,
      multiSelectController = null;