VitComboBox<T>.rawBuilder constructor

VitComboBox<T>.rawBuilder({
  1. required Widget optionsBuilder(
    1. OverlayEntry entry
    ),
  2. required Widget selectedItemBuilder(),
  3. void onClose()?,
  4. String? label,
  5. VitComboBoxStyle? style,
  6. T? selection,
  7. Widget? trailing,
  8. bool enabled = true,
})

Creates a combobox with a custom option overlay by providing optionsBuilder.

Implementation

factory VitComboBox.rawBuilder({
  required Widget Function(OverlayEntry entry) optionsBuilder,
  required Widget Function() selectedItemBuilder,
  void Function()? onClose,
  String? label,
  VitComboBoxStyle? style,
  T? selection,
  Widget? trailing,
  bool enabled = true,
}) {
  return VitComboBox._(
    label: label,
    optionsBuilder: optionsBuilder,
    selectedItemBuilder: (_) => selectedItemBuilder(),
    onClose: onClose,
    style: style,
    enabled: enabled,
    selection: selection,
    trailing: trailing,
  );
}