ChipChoiceGroup<T> constructor
ChipChoiceGroup<T> ({
- required List<
LabelValue< items,T> > - Set<
T> ? selected, - Color? selectedColor,
- bool allowEmpty = true,
- bool multiSelect = false,
- void onChange(
- Set<
T> selectedItems
- Set<
- WrapAlignment alignment = WrapAlignment.start,
- WrapAlignment runAlignment = WrapAlignment.center,
- 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.");
}