Member.fromJson constructor

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

Implementation

factory Member.fromJson(Map<String, dynamic> json) => Member(
      contactType: json["contactType"] == "unknown"
          ? "unknown_contact"
          : json["contactType"] == "live"
              ? "live_contact"
              : json["contactType"] == "local"
                  ? "local_contact"
                  : json["contactType"] == "deleted"
                      ? "deleted_contact"
                      : json["contactType"],
      email: json["email"],
      groupCreatedTime: json["groupCreatedTime"].toString(),
      image: json["image"],
      imagePrivacyFlag: json["imagePrivacyFlag"].toString(),
      isAdminBlocked:
          Platform.isIOS ? json["isBlockedByAdmin"] : json["isAdminBlocked"],
      isBlocked: json["isBlocked"],
      isBlockedMe: json["isBlockedMe"],
      isGroupAdmin: json["isGroupAdmin"],
      isGroupInOfflineMode: json["isGroupInOfflineMode"],
      isGroupProfile: Platform.isIOS
          ? json["profileChatType"] == "singleChat"
              ? false
              : true
          : json["isGroupProfile"],
      isItSavedContact: json["isItSavedContact"],
      isMuted: json["isMuted"],
      isSelected: json["isSelected"],
      jid: json["jid"],
      lastSeenPrivacyFlag: json["lastSeenPrivacyFlag"].toString(),
      mobileNUmberPrivacyFlag: json["mobileNUmberPrivacyFlag"].toString(),
      mobileNumber: json["mobileNumber"],
      name: json["name"],
      nickName: json["nickName"],
      status: json["status"],
    );