from static method

QuantityType from(
  1. String identifier
)

Implementation

static QuantityType from(String identifier) {
  for (final type in QuantityType.values) {
    if (type.identifier == identifier) {
      return type;
    }
  }
  throw InvalidValueException('Unknown identifier: $identifier');
}