encodeText method
Encodes the specified text in base64 format.
text specifies the text to be encoded.
codec the optional codec, defaults to utf8 MailCodec.encodingUtf8.
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,
}) {
final charCodes = codec.encode(text);
return encodeData(charCodes, wrap: wrap);
}