decode method Null safety

APISecuritySchemeType? decode(
  1. String type
)

Implementation

static APISecuritySchemeType? decode(String type) {
  switch (type) {
    case "apiKey":
      return APISecuritySchemeType.apiKey;
    case "http":
      return APISecuritySchemeType.http;
    case "oauth2":
      return APISecuritySchemeType.oauth2;
    case "openID":
      return APISecuritySchemeType.openID;
    default:
      return null;
  }
}