CustomDropdown<T>.searchRequest constructor
const
CustomDropdown<T>.searchRequest(- {Key? key,
- required Future<List<T>> futureRequest(
- String
)?,
- required dynamic onChanged(
- T?
)?,
- Duration? futureRequestDelay,
- T? initialItem,
- List<T>? items,
- SingleSelectController<T?>? controller,
- ScrollController? itemsScrollController,
- String? hintText,
- CustomDropdownDecoration? decoration,
- dynamic visibility(
- bool
)?,
- OverlayPortalController? overlayController,
- String? searchHintText,
- String? noResultFoundText,
- _ListItemBuilder<T>? listItemBuilder,
- _HintBuilder? hintBuilder,
- _NoResultFoundBuilder? noResultFoundBuilder,
- String? validator(
- T?
)?,
- bool validateOnChange = true,
- int maxlines = 1,
- double? overlayHeight,
- EdgeInsets? expandedHeaderPadding,
- EdgeInsets? itemsListPadding,
- EdgeInsets? listItemPadding,
- Widget? searchRequestLoadingIndicator,
- bool excludeSelected = true,
- bool canCloseOutsideBounds = true,
- bool hideSelectedFieldWhenExpanded = false,
- bool enabled = true,
- CustomDropdownDisabledDecoration? disabledDecoration,
- bool closeDropDownOnClearFilterSearch = false}
)
Implementation
const CustomDropdown.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,
}) : 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;