decode static method Null safety

APIParameterLocation? decode(
  1. String? location
)

Implementation

static APIParameterLocation? decode(String? location) {
  switch (location) {
    case "query":
      return APIParameterLocation.query;
    case "header":
      return APIParameterLocation.header;
    case "path":
      return APIParameterLocation.path;
    case "formData":
      return APIParameterLocation.formData;
    case "body":
      return APIParameterLocation.body;
    default:
      return null;
  }
}