fromContentTransferEncodingName method Null safety

TransferEncoding fromContentTransferEncodingName(
  1. String name
)

Implementation

static TransferEncoding fromContentTransferEncodingName(String name) {
  switch (name.toLowerCase()) {
    case '7bit':
      return TransferEncoding.sevenBit;
    case '8bit':
      return TransferEncoding.eightBit;
    case 'quoted-printable':
      return TransferEncoding.quotedPrintable;
    case 'base64':
      return TransferEncoding.base64;
  }
  return TransferEncoding.automatic;
}