chooseAny<T> method
Prompts user to select multiple choices from choices.
Implementation
@override
List<T> chooseAny<T>(String message,
{required List<T> choices,
List<T>? defaultValues,
String Function(T)? display}) {
if (_isJsonOutput) return defaultValues ?? [];
// Hack to prevent mason_logger from breaking when choices cause terminal scrolling.
// We pre-allocate the lines to force scrolling before saving the cursor.
final linesNeeded = choices.length + 1;
io.stdout.write('\n' * linesNeeded);
io.stdout.write('\x1B[${linesNeeded}A');
return _logger.chooseAny<T>(message,
choices: choices, defaultValues: defaultValues, display: display);
}