multiOption method

List<String> multiOption(
  1. String name
)

Returns the list of parsed (or default) command-line options for name.

name must be a valid option name in the parser.

Implementation

List<String> multiOption(String name) {
  var option = _parser.options[name];
  if (option == null) {
    throw ArgumentError('Could not find an option named "--$name".');
  }
  if (!option.isMultiple) {
    throw ArgumentError('"$name" is not a multi-option.');
  }
  return option.valueOrDefault(_parsed[name]) as List<String>;
}