EmailData.fromJson constructor

EmailData.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory EmailData.fromJson(Map<String, dynamic> json) => EmailData(
      id: json["id"] == null ? null : json["id"],
      firstName: json["first_name"] == null ? null : json["first_name"],
      middleName: json["middle_name"],
      lastName: json["last_name"] == null ? null : json["last_name"],
      suffix: json["suffix"] == null ? null : json["suffix"],
      email: json["email"] == null ? null : json["email"],
      username: json["username"],
      address1: json["address_1"] == null ? null : json["address_1"],
      address2: json["address_2"] == null ? null : json["address_2"],
      state: json["state"] == null ? null : json["state"],
      country: json["country"] == null ? null : json["country"],
      postalCode: json["postal_code"] == null ? null : json["postal_code"],
      phone: json["phone"] == null ? null : json["phone"],
      phoneType: json["phone_type"] == null ? null : json["phone_type"],
      locale: json["locale"] == null ? null : json["locale"],
      status: json["status"] == null ? null : json["status"],
      dateOfBirth:
          json["date_of_birth"] == null ? null : json["date_of_birth"],
      createdAt: json["created_at"] == null
          ? null
          : DateTime.parse(json["created_at"]),
      updatedAt: json["updated_at"] == null
          ? null
          : DateTime.parse(json["updated_at"]),
    );