EHttpMethod.fromValue constructor

EHttpMethod.fromValue(
  1. int value
)

Implementation

factory EHttpMethod.fromValue(int value) {
  switch (value) {
    case 0:
      return EHttpMethod.invalid;
    case 1:
      return EHttpMethod.get_;
    case 2:
      return EHttpMethod.head;
    case 3:
      return EHttpMethod.post;
    case 4:
      return EHttpMethod.put;
    case 5:
      return EHttpMethod.delete;
    case 6:
      return EHttpMethod.options;
    case 7:
      return EHttpMethod.patch;
    default:
      throw UnknownEnumValueException(
        "Unknown value for 'EHttpMethod'. The value was: '$value'",
      );
  }
}