VitComboBox<T>.itemBuilder constructor
VitComboBox<T>.itemBuilder ({})
Creates a combobox with option overlay using the ListView and
itemBuilder
.
Implementation
factory VitComboBox.itemBuilder({
required Set<T> options,
required Widget Function(T item) itemBuilder,
required FutureOr<bool?> Function(T key) onSelected,
Widget Function(T? selection)? selectedItemBuilder,
void Function()? onClose,
String? label,
VitComboBoxStyle? style,
T? selection,
Widget? trailing,
bool enabled = true,
}) {
return VitComboBox._(
options: options,
itemBuilder: itemBuilder,
selectedItemBuilder: selectedItemBuilder,
onSelected: onSelected,
style: style,
enabled: enabled,
label: label,
onClose: onClose,
selection: selection,
trailing: trailing,
);
}