getOptionValues abstract method
Returns the values for a given option name.
Behavior:
--flag
returns[]
--key=value
returns["value"]
- multiple occurrences (
--key=1 --key=2
) return["1", "2"]
- if the key is missing, returns
null
Example:
final values = getOptionValues('files');
if (values != null) {
print(values.join(', '));
}
Implementation
@protected
List<String>? getOptionValues(String name);