defaultFor method

dynamic defaultFor(
  1. String option
)

Returns the default value for option.

Implementation

dynamic defaultFor(String option) {
  var value = findByNameOrAlias(option);
  if (value == null) {
    throw ArgumentError('No option named $option');
  }
  return value.defaultsTo;
}