encode static method Null safety

String? encode(
  1. APIType? type
)

Implementation

static String? encode(APIType? type) {
  switch (type) {
    case APIType.string:
      return "string";
    case APIType.number:
      return "number";
    case APIType.integer:
      return "integer";
    case APIType.boolean:
      return "boolean";
    case APIType.array:
      return "array";
    case APIType.file:
      return "file";
    case APIType.object:
      return "object";
    default:
      return null;
  }
}