encodeText method

  1. @override
String encodeText(
  1. String text, {
  2. Codec codec = MailCodec.encodingUtf8,
  3. bool wrap = true,
})
override

Encodes the specified text in base64 format. text specifies the text to be encoded. codec the optional codec, which defaults to utf8. Set wrap to false in case you do not want to wrap lines.

Implementation

@override
String encodeText(String text,
    {Codec codec = MailCodec.encodingUtf8, bool wrap = true}) {
  var charCodes = codec.encode(text);
  return encodeData(charCodes, wrap: wrap);
}