fromString static method

CustomsRestrictionType? fromString(
  1. String? value
)

Get the CustomsRestrictionType from a String.

Implementation

static CustomsRestrictionType? fromString(String? value) {
  switch (value) {
    case 'none':
      return none;
    case 'quarantine':
      return quarantine;
    case 'sanitary_phytosanitary_inspection':
      return sanitaryAndPhytosanitary;
    case 'other':
      return other;
    default:
      return null;
  }
}