encode static method Null safety

String? encode(
  1. APIParameterLocation? location
)

Implementation

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