DropdownFlutter<T>.multiSelectSearch constructor
DropdownFlutter<T>.multiSelectSearch ({
- Key? key,
- required List<
T> ? items, - required dynamic onListChanged(
- List<
T>
- List<
- MultiSelectController<
T> ? multiSelectController, - List<
T> ? initialItems, - SingleSelectController<
T?> ? controller, - dynamic visibility()?,
- ScrollController? itemsScrollController,
- OverlayPortalController? overlayController,
- String? listValidator(
- List<
T>
- List<
- _ListItemBuilder<
T> ? listItemBuilder, - _HintBuilder? hintBuilder,
- CustomDropdownDecoration? decoration,
- _HeaderListBuilder<
T> ? headerListBuilder, - String? noResultFoundText,
- _NoResultFoundBuilder? noResultFoundBuilder,
- String? hintText,
- String? searchHintText,
- bool validateOnChange = true,
- bool canCloseOutsideBounds = true,
- bool hideSelectedFieldWhenExpanded = false,
- int maxlines = 1,
- double? overlayHeight,
- EdgeInsets? closedHeaderPadding,
- EdgeInsets? expandedHeaderPadding,
- EdgeInsets? itemsListPadding,
- EdgeInsets? listItemPadding,
- bool enabled = true,
- CustomDropdownDisabledDecoration? disabledDecoration,
- bool closeDropDownOnClearFilterSearch = false,
- bool shouldResetSelection = false,
Implementation
DropdownFlutter.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,
this.shouldResetSelection = 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;