ShadSelect<T>.multiple constructor

const ShadSelect<T>.multiple({
  1. Key? key,
  2. Iterable<Widget>? options,
  3. Widget? optionsBuilder(
    1. BuildContext,
    2. int
    )?,
  4. required ShadSelectedOptionBuilder<List<T>>? selectedOptionsBuilder,
  5. ShadPopoverController? popoverController,
  6. bool enabled = true,
  7. Widget? placeholder,
  8. TextStyle? placeholderStyle,
  9. Set<T> initialValues = const {},
  10. ValueChanged<Set<T>>? onChanged,
  11. FocusNode? focusNode,
  12. bool closeOnTapOutside = true,
  13. double? minWidth,
  14. double? maxWidth,
  15. double? maxHeight,
  16. ShadDecoration? decoration,
  17. Widget? trailing,
  18. EdgeInsetsGeometry? padding,
  19. EdgeInsetsGeometry? optionsPadding,
  20. bool? showScrollToBottomChevron,
  21. bool? showScrollToTopChevron,
  22. ScrollController? scrollController,
  23. ShadAnchorBase? anchor,
  24. List<Effect>? effects,
  25. List<BoxShadow>? shadows,
  26. ImageFilter? filter,
  27. Widget? header,
  28. Widget? footer,
  29. bool allowDeselection = true,
  30. bool closeOnSelect = true,
  31. Object? groupId,
  32. int? itemCount,
  33. bool? shrinkWrap,
  34. ShadSelectController<T>? controller,
  35. Duration? popoverReverseDuration,
  36. bool? ensureSelectedVisible,
  37. VoidCallback? onPressed,
})

Creates a ShadSelect with the multiple select variant.

Implementation

const ShadSelect.multiple({
  super.key,
  this.options,
  this.optionsBuilder,
  required this.selectedOptionsBuilder,
  this.popoverController,
  this.enabled = true,
  this.placeholder,
  this.placeholderStyle,
  this.initialValues = const {},
  ValueChanged<Set<T>>? onChanged,
  this.focusNode,
  this.closeOnTapOutside = true,
  this.minWidth,
  this.maxWidth,
  this.maxHeight,
  this.decoration,
  this.trailing,
  this.padding,
  this.optionsPadding,
  this.showScrollToBottomChevron,
  this.showScrollToTopChevron,
  this.scrollController,
  this.anchor,
  this.effects,
  this.shadows,
  this.filter,
  this.header,
  this.footer,
  this.allowDeselection = true,
  this.closeOnSelect = true,
  this.groupId,
  this.itemCount,
  this.shrinkWrap,
  this.controller,
  this.popoverReverseDuration,
  this.ensureSelectedVisible,
  this.onPressed,
}) : variant = ShadSelectVariant.multiple,
     onSearchChanged = null,
     initialValue = null,
     selectedOptionBuilder = null,
     searchDivider = null,
     searchPlaceholder = null,
     searchInputLeading = null,
     searchPadding = null,
     search = null,
     clearSearchOnClose = false,
     onChanged = null,
     onMultipleChanged = onChanged,
     searchFocusNode = null,
     onSearchSubmitted = null,
     assert(
       options != null || optionsBuilder != null,
       'Either options or optionsBuilder must be provided',
     );