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. Duration? animationDuration,
  35. Curve? animationCurve,
  36. bool enableHapticFeedback = false,
  37. String groupBy(
    1. T item
    )?,
  38. _GroupHeaderBuilder? groupHeaderBuilder,
  39. int recentSelectionsMaxCount = 0,
  40. List<T>? initialRecentItems,
  41. ValueChanged<List<T>>? onRecentItemsChanged,
  42. bool enableKeyboardNavigation = false,
  43. bool highlightMatchedText = false,
  44. bool showSelectAll = false,
  45. String? selectAllText,
  46. String? clearAllText,
})

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.animationDuration,
  this.animationCurve,
  this.enableHapticFeedback = false,
  this.groupBy,
  this.groupHeaderBuilder,
  this.recentSelectionsMaxCount = 0,
  this.initialRecentItems,
  this.onRecentItemsChanged,
  this.enableKeyboardNavigation = false,
  this.highlightMatchedText = false,
  this.showSelectAll = false,
  this.selectAllText,
  this.clearAllText,
}) : 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;