promptAny method
Asks question for many values on one line, split on separator
and trimmed, the blank ones dropped; an empty line answers
defaultValues, or none without them.
validate refuses the values with a message, and the question is
asked again. It asks as prompt does, the values shown joined by
commas once answered; where nobody can answer, without
defaultValues, or with values validate refuses,
PromptAnswerRequiredException.
final tags = await cli.promptAny(
'Tags?',
defaultValues: ['cli', 'dart'],
);
Implementation
Future<List<String>> promptAny(
String question, {
String separator = ',',
List<String>? defaultValues,
String? Function(List<String> answer)? validate,
String? placeholder,
}) => _prompter.promptAny(
question,
separator: separator,
defaultValues: defaultValues,
validate: validate,
placeholder: placeholder,
);