getContentTransferEncodingName method Null safety

String getContentTransferEncodingName(
  1. TransferEncoding encoding
)

Retrieves the name of the specified encoding.

Implementation

static String getContentTransferEncodingName(TransferEncoding encoding) {
  switch (encoding) {
    case TransferEncoding.sevenBit:
      return '7bit';
    case TransferEncoding.eightBit:
      return '8bit';
    case TransferEncoding.quotedPrintable:
      return 'quoted-printable';
    case TransferEncoding.base64:
      return 'base64';
    default:
      throw StateError('Unhandled transfer encoding: $encoding');
  }
}