ChipChoiceGroup<T> constructor

ChipChoiceGroup<T>({
  1. required List<LabelValue<T>> items,
  2. Set<T>? selected,
  3. Color? selectedColor,
  4. bool allowEmpty = true,
  5. bool multiSelect = false,
  6. void onChange(
    1. Set<T> selectedItems
    )?,
  7. WrapAlignment alignment = WrapAlignment.start,
  8. WrapAlignment runAlignment = WrapAlignment.center,
  9. WrapCrossAlignment crossAxisAlignment = WrapCrossAlignment.center,
})

Implementation

ChipChoiceGroup({
  required this.items,
  Set<T>? selected,
  Color? selectedColor,
  this.allowEmpty = true,
  this.multiSelect = false,
  this.onChange,
  this.alignment = WrapAlignment.start,
  this.runAlignment = WrapAlignment.center,
  this.crossAxisAlignment = WrapCrossAlignment.center,
})  : selectedColor = selectedColor ?? selectedColorDefault,
      super() {
  if (selected != null) this.selected.addAll(selected);
  if (!allowEmpty && this.selected.isEmpty) raise("allowEmpty=false, but selected is empty.");
}