decodeText method Null safety

  1. @override
String decodeText(
  1. ContentTypeHeader? contentTypeHeader,
  2. String? contentTransferEncoding
)
override

Decodes the text represented by the mime data

Implementation

@override
String decodeText(
    ContentTypeHeader? contentTypeHeader, String? contentTransferEncoding) {
  if (_bodyStartIndex == null) {
    return '';
  }
  return MailCodec.decodeAsText(
      _bodyData, contentTransferEncoding, contentTypeHeader?.charset);
}