EmailContent.fromJson constructor

EmailContent.fromJson(
  1. Map<String, Object?> json
)

Implementation

factory EmailContent.fromJson(Map<String, Object?> json) => EmailContent(
      subject: json["subject"] as String,
      html: json["html"] as String,
      from: json["from"] == null
          ? null
          : Mailbox.fromJson(
              (json["from"] as Map).cast<String, Object?>(),
            ),
      replyTo: json["reply_to"] == null
          ? null
          : Mailbox.fromJson(
              (json["reply_to"] as Map).cast<String, Object?>(),
            ),
      headers: json["headers"] == null
          ? null
          : core.MessageHeaders.fromJson(json["headers"]),
    );