multiOptionValue function

Iterable<String>? multiOptionValue(
  1. ArgResults? argResults,
  2. String name
)

Implementation

Iterable<String>? multiOptionValue(ArgResults? argResults, String name) {
  if (argResults == null || argResults[name] == null) {
    return null;
  }
  if (argResults[name] is! Iterable<String>) {
    throw ArgumentError('Option "$name" is not a multi-option.');
  }
  return List<String>.from(argResults[name]);
}