ShadSelect<T>.multipleWithSearch constructor
const
ShadSelect<T>.multipleWithSearch ({
- Key? key,
- Iterable<
Widget> ? options, - Widget? optionsBuilder()?,
- ValueChanged<
String> ? onSearchChanged, - required ShadSelectedOptionBuilder<
List< ? selectedOptionsBuilder,T> > - ValueChanged<
Set< ? onChanged,T> > - ShadPopoverController? popoverController,
- Widget? searchDivider,
- Widget? searchInputLeading,
- Widget? searchPlaceholder,
- EdgeInsetsGeometry? searchPadding,
- Widget? search,
- bool? clearSearchOnClose,
- bool enabled = true,
- Widget? placeholder,
- TextStyle? placeholderStyle,
- Set<
T> initialValues = const {}, - FocusNode? focusNode,
- bool closeOnTapOutside = true,
- double? minWidth,
- double? maxWidth,
- double? maxHeight,
- ShadDecoration? decoration,
- Widget? trailing,
- EdgeInsetsGeometry? padding,
- EdgeInsetsGeometry? optionsPadding,
- bool? showScrollToBottomChevron,
- bool? showScrollToTopChevron,
- ScrollController? scrollController,
- ShadAnchorBase? anchor,
- List<
Effect> ? effects, - List<
BoxShadow> ? shadows, - ImageFilter? filter,
- Widget? header,
- bool allowDeselection = true,
- bool closeOnSelect = true,
- Object? groupId,
- int? itemCount,
- bool? shrinkWrap,
- ShadSelectController<
T> ? controller, - Duration? popoverReverseDuration,
- bool? ensureSelectedVisible,
- FocusNode? searchFocusNode,
- ValueChanged<
String> ? onSearchSubmitted, - 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',
);