ShadSelect<T>.multiple constructor
const
ShadSelect<T>.multiple ({
- Key? key,
- Iterable<
Widget> ? options, - Widget? optionsBuilder()?,
- required ShadSelectedOptionBuilder<
List< ? selectedOptionsBuilder,T> > - ShadPopoverController? popoverController,
- bool enabled = true,
- Widget? placeholder,
- TextStyle? placeholderStyle,
- Set<
T> initialValues = const {}, - ValueChanged<
Set< ? onChanged,T> > - 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,
- 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',
);