ControlledMultiSelect<T>  constructor 
      const
      ControlledMultiSelect<T> ({ 
    
- Key? key,
- MultiSelectController<T> ? controller,
- ValueChanged<Iterable< ? onChanged,T> ?>
- bool enabled = true,
- Iterable<T> ? initialValue,
- Widget? placeholder,
- bool filled = false,
- FocusNode? focusNode,
- BoxConstraints? constraints,
- BoxConstraints? popupConstraints,
- PopoverConstraint popupWidthConstraint = PopoverConstraint.anchorFixedSize,
- BorderRadiusGeometry? borderRadius,
- EdgeInsetsGeometry? padding,
- AlignmentGeometry popoverAlignment = Alignment.topCenter,
- AlignmentGeometry? popoverAnchorAlignment,
- bool disableHoverEffect = false,
- bool canUnselect = true,
- bool autoClosePopover = false,
- Predicate<Iterable< ? showValuePredicate,T> >
- required SelectPopupBuilder popup,
- required SelectValueBuilder<T> itemBuilder,
- SelectValueSelectionHandler<Iterable< ? valueSelectionHandler,T> >
- SelectValueSelectionPredicate<Iterable< ? valueSelectionPredicate,T> >
Creates a ControlledMultiSelect.
Either controller or onChanged should be provided for interactivity.
The widget supports both controller-based and callback-based state management
patterns with multiple item selection capabilities.
Parameters:
- controller(MultiSelectController
- initialValue(Iterable
- onChanged(ValueChanged<Iterable
- enabled(bool, default: true): whether select is interactive
- placeholder(Widget?, optional): widget shown when no items selected
- filled(bool, default: false): whether to use filled appearance
- focusNode(FocusNode?, optional): custom focus node for keyboard handling
- constraints(BoxConstraints?, optional): size constraints for select widget
- popupConstraints(BoxConstraints?, optional): size constraints for popup
- popupWidthConstraint(PopoverConstraint, default: anchorFixedSize): popup width behavior
- borderRadius(BorderRadiusGeometry?, optional): override select border radius
- padding(EdgeInsetsGeometry?, optional): override internal padding
- popoverAlignment(AlignmentGeometry, default: topCenter): popup alignment
- popoverAnchorAlignment(AlignmentGeometry?, optional): anchor alignment
- disableHoverEffect(bool, default: false): disable item hover effects
- canUnselect(bool, default: false): allow deselecting all items
- autoClosePopover(bool, default: false): close popup after each selection
- popup(SelectPopupBuilder, required): builder for popup content
- itemBuilder(SelectItemBuilder
- multiItemBuilder (SelectValueBuilder
- valueSelectionHandler(SelectValueSelectionHandler<Iterable
- valueSelectionPredicate(SelectValueSelectionPredicate<Iterable
- showValuePredicate(Predicate<Iterable
Example:
ControlledMultiSelect<String>(
  controller: controller,
  popup: (context, items) => ListView(children: items),
  itemBuilder: (context, item, selected) => CheckboxListTile(
    value: selected,
    title: Text(item),
  ),
  multiItemBuilder: (context, items) => Wrap(
    children: items.map((item) => Chip(label: Text(item))).toList(),
  ),
)
Implementation
const ControlledMultiSelect({
  super.key,
  this.controller,
  this.onChanged,
  this.enabled = true,
  this.initialValue,
  this.placeholder,
  this.filled = false,
  this.focusNode,
  this.constraints,
  this.popupConstraints,
  this.popupWidthConstraint = PopoverConstraint.anchorFixedSize,
  this.borderRadius,
  this.padding,
  this.popoverAlignment = Alignment.topCenter,
  this.popoverAnchorAlignment,
  this.disableHoverEffect = false,
  this.canUnselect = true,
  this.autoClosePopover = false,
  this.showValuePredicate,
  required this.popup,
  required SelectValueBuilder<T> itemBuilder,
  this.valueSelectionHandler,
  this.valueSelectionPredicate,
}) : multiItemBuilder = itemBuilder;