ShadSelect<T>.multipleWithSearch constructor

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

Creates a ShadSelect with the multiple select and search variant.

Implementation

const ShadSelect.multipleWithSearch({
  super.key,
  this.options,
  this.optionsBuilder,
  this.onSearchChanged,
  required this.selectedOptionsBuilder,
  ValueChanged<Set<T>>? onChanged,
  this.popoverController,
  this.searchDivider,
  this.searchInputLeading,
  this.searchPlaceholder,
  this.searchPadding,
  this.search,
  this.clearSearchOnClose,
  this.enabled = true,
  this.placeholder,
  this.placeholderStyle,
  this.initialValues = const {},
  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.searchFocusNode,
  this.onSearchSubmitted,
  this.onPressed,
}) : variant = ShadSelectVariant.multipleWithSearch,
     selectedOptionBuilder = null,
     onChanged = null,
     onMultipleChanged = onChanged,
     initialValue = null,
     assert(
       options != null || optionsBuilder != null,
       'Either options or optionsBuilder must be provided',
     ),
     assert(
       search != null || onSearchChanged != null,
       'Either search or onSearchChanged must be provided',
     );