multi<T> static method

List<T> multi<T>({
  1. required String title,
  2. required List<T> items,
  3. PromptTheme theme = PromptTheme.dark,
  4. int maxVisible = 10,
  5. Set<int>? initialSelection,
  6. String labelBuilder(
    1. T
    )?,
  7. bool searchEnabled = true,
})

Creates a multi-select searchable prompt.

Implementation

static List<T> multi<T>({
  required String title,
  required List<T> items,
  PromptTheme theme = PromptTheme.dark,
  int maxVisible = 10,
  Set<int>? initialSelection,
  String Function(T)? labelBuilder,
  bool searchEnabled = true,
}) {
  final prompt = SearchableListPrompt<T>(
    title: title,
    items: items,
    theme: theme,
    multiSelect: true,
    maxVisible: maxVisible,
    initialSelection: initialSelection,
    searchEnabled: searchEnabled,
  );

  return prompt.run(itemLabel: labelBuilder);
}