fromString static method

HazmatType? fromString(
  1. String? value
)

Get the HazmatType from a String.

Implementation

static HazmatType? fromString(String? value) {
  switch (value) {
    case 'PRIMARY_CONTAINED':
      return primaryContained;
    case 'PRIMARY_PACKED':
      return primaryPacked;
    case 'PRIMARY':
      return primary;
    case 'SECONDARY_CONTAINED':
      return secondaryContained;
    case 'SECONDARY_PACKED':
      return secondaryPacked;
    case 'SECONDARY':
      return secondary;
    case 'ORMD':
      return ormD;
    case 'LIMITED_QUANTITY':
      return limitedQuantity;
    case 'LITHIUM':
      return lithium;
    default:
      return null;
  }
}