encode static method Null safety

String? encode(
  1. APISecuritySchemeType? type
)

Implementation

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