DropdownFlutter<T>.search constructor

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

Implementation

DropdownFlutter.search({
  super.key,
  required this.items,
  required this.onChanged,
  this.controller,
  this.itemsScrollController,
  this.initialItem,
  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.excludeSelected = true,
  this.canCloseOutsideBounds = true,
  this.hideSelectedFieldWhenExpanded = false,
  this.enabled = true,
  this.disabledDecoration,
  this.closeDropDownOnClearFilterSearch = false,
})  : assert(
        initialItem == null || controller == null,
        'Only one of initialItem or controller can be specified at a time',
      ),
      assert(
        initialItem == null || items!.contains(initialItem),
        'Initial item must match with one of the item in items list.',
      ),
      assert(
        controller == null ||
            controller.value == null ||
            items!.contains(controller.value),
        'Controller value must match with one of the item in items list.',
      ),
      _searchType = _SearchType.onListData,
      _dropdownType = _DropdownType.singleSelect,
      futureRequest = null,
      futureRequestDelay = null,
      initialItems = null,
      onListChanged = null,
      listValidator = null,
      headerListBuilder = null,
      searchRequestLoadingIndicator = null,
      multiSelectController = null;