showChips<T> method
Implementation
Future<Set<T>?> showChips<T>({
required List<LabelValue<T>> items,
Set<T>? selected,
String? title,
bool allowEmpty = true,
bool multiSelect = false,
List<Widget>? aboveWidgets,
List<Widget>? belowWidgets,
}) async {
ChipChoiceGroup<T> group = ChipChoiceGroup(items: items, selected: selected, allowEmpty: allowEmpty, multiSelect: multiSelect, alignment: WrapAlignment.center);
return showColumn(
onContent: (uc) {
uc.onValidate = () {
uc.setResult(group.selected);
return true;
};
return group;
},
title: title,
ok: true,
cancel: true,
aboveWidgets: aboveWidgets,
belowWidgets: belowWidgets,
);
}