DropdownFlutter<T>.multiSelect constructor

DropdownFlutter<T>.multiSelect({
  1. Key? key,
  2. required List<T>? items,
  3. required dynamic onListChanged(
    1. List<T>
    )?,
  4. MultiSelectController<T>? multiSelectController,
  5. SingleSelectController<T?>? controller,
  6. List<T>? initialItems,
  7. OverlayPortalController? overlayController,
  8. ScrollController? itemsScrollController,
  9. String? listValidator(
    1. List<T>
    )?,
  10. dynamic visibility(
    1. bool
    )?,
  11. _HeaderListBuilder<T>? headerListBuilder,
  12. String? hintText,
  13. CustomDropdownDecoration? decoration,
  14. bool validateOnChange = true,
  15. _ListItemBuilder<T>? listItemBuilder,
  16. _HintBuilder? hintBuilder,
  17. bool canCloseOutsideBounds = true,
  18. bool hideSelectedFieldWhenExpanded = false,
  19. int maxlines = 1,
  20. double? overlayHeight,
  21. EdgeInsets? closedHeaderPadding,
  22. EdgeInsets? expandedHeaderPadding,
  23. EdgeInsets? itemsListPadding,
  24. EdgeInsets? listItemPadding,
  25. bool enabled = true,
  26. CustomDropdownDisabledDecoration? disabledDecoration,
})

Implementation

DropdownFlutter.multiSelect({
  super.key,
  required this.items,
  required this.onListChanged,
  this.multiSelectController,
  this.controller,
  this.initialItems,
  this.overlayController,
  this.itemsScrollController,
  this.listValidator,
  this.visibility,
  this.headerListBuilder,
  this.hintText,
  this.decoration,
  this.validateOnChange = true,
  this.listItemBuilder,
  this.hintBuilder,
  this.canCloseOutsideBounds = true,
  this.hideSelectedFieldWhenExpanded = false,
  this.maxlines = 1,
  this.overlayHeight,
  this.closedHeaderPadding,
  this.expandedHeaderPadding,
  this.itemsListPadding,
  this.listItemPadding,
  this.enabled = true,
  this.disabledDecoration,
})  : 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 = null,
      _dropdownType = _DropdownType.multipleSelect,
      initialItem = null,
      noResultFoundText = null,
      validator = null,
      headerBuilder = null,
      onChanged = null,
      excludeSelected = false,
      futureRequest = null,
      futureRequestDelay = null,
      noResultFoundBuilder = null,
      searchHintText = null,
      searchRequestLoadingIndicator = null,
      closeDropDownOnClearFilterSearch = false;