multiSelect<T> function
Prompts the user to select multiple options from a list.
Implementation
List<T> multiSelect<T>(
String message, {
required List<T> options,
required String Function(T) display,
}) {
final selection = MultiSelect.withTheme(
prompt:
'$message ${Logger.mutedPen.write('(↑↓ navigate, space to select)')}',
options: List.of(options.map(display)),
theme: checkboxTheme,
).interact();
return List.of(selection.map((index) => options[index]));
}