Recipient.fromJson constructor

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

Implementation

factory Recipient.fromJson(Map<String, Object?> json) => Recipient(
      type: RecipientType.fromJson(json["type"]),
      name: json["name"] == null ? null : json["name"] as String,
      phone: json["phone"] == null
          ? null
          : RecipientPhone.fromJson(
              (json["phone"] as Map).cast<String, Object?>(),
            ),
      email: json["email"] == null
          ? null
          : RecipientEmail.fromJson(
              (json["email"] as Map).cast<String, Object?>(),
            ),
    );