encode 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.cookie:
      return "cookie";
    default:
      return null;
  }
}