fromString static method

InsuranceProvider? fromString(
  1. String? value
)

Get the InsuranceProvider from a String.

Implementation

static InsuranceProvider? fromString(String? value) {
  switch (value) {
    case 'easypost':
      return easypost;
    case 'pip':
      return pip;
    case 'shipsurance':
      return shipsurance;
    default:
      return null;
  }
}