getTransferFormatFromString function

TransferFormat getTransferFormatFromString(
  1. String? value
)

Implementation

TransferFormat getTransferFormatFromString(String? value) {
  if (value == null || value == "") {
    return TransferFormat.Undefined;
  }

  value = value.toUpperCase();
  switch (value) {
    case "TEXT":
      return TransferFormat.Text;
    case "BINARY":
      return TransferFormat.Binary;
    default:
      throw new GeneralError("$value is not a supported HttpTransportType");
  }
}