runMultiSelectPrompt<T> function
Future<List<T> ?>
runMultiSelectPrompt<T>(
- MultiSelectModel<
T> model, - Terminal terminal, {
- ProgramOptions? options,
Runs a MultiSelectModel and resolves to the selected items, or null if
cancelled.
Implementation
Future<List<T>?> runMultiSelectPrompt<T>(
MultiSelectModel<T> model,
Terminal terminal, {
ProgramOptions? options,
}) async {
final controller = _PromptController<List<T>?>();
final program = Program(
_MultiSelectPromptModel<T>(model, controller),
options: options ?? promptProgramOptions,
terminal: terminal,
);
await program.run();
return await controller.future;
}