addValue method
Adding values
Implementation
int addValue(String? value) {
if ((value == null) || value.isEmpty) {
return 0;
}
if (optDef.isFlag) {
throw CliOptValueUnexpectedException(fullName);
}
final unquoted = value.unquote();
if (optDef.valueSeparator.isEmpty) {
values.add(unquoted);
return 1;
}
var newValues = unquoted.split(optDef.valueSeparator);
values.addAll(newValues);
return newValues.length;
}