RenderedEmail.fromJson constructor

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

Implementation

factory RenderedEmail.fromJson(Map<String, Object?> json) => RenderedEmail(
      subject: json["subject"] as String,
      text: json["text"] as String,
      html: json["html"] == null ? null : 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"]),
      safety: json["safety"] == null
          ? null
          : SafetyResult.fromJson(
              (json["safety"] as Map).cast<String, Object?>(),
            ),
    );