toJson method
Implementation
@override
Map<String, Object?> toJson() => {
"subject": encodeValue(subject),
"text": encodeValue(text),
if (html != null) "html": encodeValue(html),
if (from != null) "from": encodeValue(from),
if (replyTo != null) "reply_to": encodeValue(replyTo),
if (headers != null) "headers": encodeValue(headers),
if (safety != null) "safety": encodeValue(safety),
};