EmailPayload.fromMap constructor
EmailPayload.fromMap(
- Map<String, dynamic> json
)
Implementation
factory EmailPayload.fromMap(Map<String, dynamic> json) => EmailPayload(
from: json["from"] == null ? null : EmailFrom.fromMap(json["from"]),
to: json["to"] == null
? []
: List<EmailAccount>.from(json["to"]!.map((x) => x)),
cc: json["cc"] == null
? []
: List<EmailAccount>.from(json["cc"]!.map((x) => x)),
bcc: json["bcc"] == null
? []
: List<EmailAccount>.from(json["bcc"]!.map((x) => x)),
subject: json["subject"],
body: json["body"],
headers: json["headers"] == null
? null
: Map<String, dynamic>.from(json["headers"]),
text: json["text"],
attachments: json["attachments"] == null
? []
: List<EmailAttachment>.from(json["attachments"]!.map((x) => x)),
category: json["category"],
variables: json["variables"] == null
? null
: Map<String, dynamic>.from(json["variables"]),
tags: json["tags"] == null
? null
: Map<String, dynamic>.from(json["tags"]),
);