selectManyTUI function

List<String> selectManyTUI(
  1. String message,
  2. List<String> choices, {
  3. List<String>? defaultValues,
})

TUI-enhanced multi-choice selection.

Uses mason_logger for checkbox-based selection when TUI is enabled. Falls back to numbered list with comma-separated input when TUI is disabled.

message The selection prompt message. choices List of options to choose from. defaultValues The default selections.

Returns the list of selected options.

Implementation

List<String> selectManyTUI(
  String message,
  List<String> choices, {
  List<String>? defaultValues,
}) {
  if (choices.isEmpty) {
    errorMessage('No choices available');
    return [];
  }

  return chooseAnyWithTUI(message, choices, defaultValues: defaultValues);
}