ChatMessage.fromJson constructor

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

Implementation

factory ChatMessage.fromJson(Map<String, dynamic> json) => ChatMessage(
    chatUserJid: json["chatUserJid"],
    contactType: json["contactType"],
    isItCarbonMessage: json["isItCarbonMessage"],
    isItSavedContact: json["isItSavedContact"],
    isMessageDeleted: json["isMessageDeleted"],
    isMessageRecalled: json["isMessageRecalled"].toString().toBool().obs,
    isMessageSentByMe: json["isMessageSentByMe"],
    isMessageStarred: json["isMessageStarred"].toString().toBool().obs,
    isSelected: json["isSelected"].toString().toBool().obs,
    isThisAReplyMessage: json["isThisAReplyMessage"],
    messageChatType: json["messageChatType"],
    messageCustomField: json["messageCustomField"] == null
        ? null
        : MessageCustomField.fromJson(json["messageCustomField"]),
    messageId: json["messageId"],
    messageSentTime: json["messageSentTime"],
    messageStatus: json["messageStatus"].toString().obs,
    messageTextContent: json["messageTextContent"],
    messageType: json["messageType"],
    replyParentChatMessage: json["replyParentChatMessage"] == null
        ? null
        : ReplyParentChatMessage.fromJson(json["replyParentChatMessage"]),
    senderNickName: json["senderNickName"],
    senderUserJid: json["senderUserJid"],
    senderUserName: json["senderUserName"],
    contactChatMessage: json["contactChatMessage"] == null
        ? null
        : ContactChatMessage.fromJson(json["contactChatMessage"]),
    mediaChatMessage: json["mediaChatMessage"] == null
        ? null
        : MediaChatMessage.fromJson(json["mediaChatMessage"]),
    locationChatMessage: json["locationChatMessage"] == null
        ? null
        : LocationChatMessage.fromJson(json["locationChatMessage"]),
    topicId: json["topicId"]);