toJson method
Implementation
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'id'] = this.id;
if (this.threadId != null) {
json[r'threadId'] = this.threadId;
} else {
json[r'threadId'] = null;
}
if (this.provider != null) {
json[r'provider'] = this.provider;
} else {
json[r'provider'] = null;
}
if (this.accountId != null) {
json[r'accountId'] = this.accountId;
} else {
json[r'accountId'] = null;
}
json[r'subject'] = this.subject;
json[r'from'] = this.from;
json[r'to'] = this.to;
json[r'cc'] = this.cc;
json[r'bcc'] = this.bcc;
json[r'body'] = this.body;
json[r'html'] = this.html;
json[r'date'] = this.date.toUtc().toIso8601String();
json[r'labels'] = this.labels;
json[r'isRead'] = this.isRead;
json[r'isStarred'] = this.isStarred;
json[r'attachments'] = this.attachments;
if (this.snippet != null) {
json[r'snippet'] = this.snippet;
} else {
json[r'snippet'] = null;
}
if (this.messageId != null) {
json[r'messageId'] = this.messageId;
} else {
json[r'messageId'] = null;
}
if (this.inReplyTo != null) {
json[r'inReplyTo'] = this.inReplyTo;
} else {
json[r'inReplyTo'] = null;
}
json[r'references'] = this.references;
return json;
}