toJson method

Map<String, dynamic> toJson()

Converts the RecentChat object to a JSON map.

Implementation

Map<String, dynamic> toJson() => {
      "contactType": contactType,
      "isAdminBlocked": isAdminBlocked,
      "isBlocked": isBlocked,
      "isBlockedMe": isBlockedMe,
      "isBroadCast": isBroadCast,
      "isChatArchived": isChatArchived,
      "isPrivateChat": isPrivateChat,
      "isChatPinned": isChatPinned,
      "isConversationUnRead": isConversationUnRead,
      "isGroup": isGroup,
      "isGroupInOfflineMode": isGroupInOfflineMode,
      "isItSavedContact": isItSavedContact,
      "isLastMessageRecalledByUser": isLastMessageRecalledByUser,
      "isLastMessageSentByMe": isLastMessageSentByMe,
      "isMuted": isMuted,
      "isSelected": isSelected,
      "jid": jid,
      "lastMessageContent": lastMessageContent,
      "lastMessageId": lastMessageId,
      "lastMessageStatus": lastMessageStatus,
      "lastMessageTime": lastMessageTime,
      "lastMessageType": lastMessageType,
      "nickName": nickName,
      "profileImage": profileImage,
      "profileName": profileName,
      "unreadMessageCount": unreadMessageCount,
      "topicId": topicId,
      "metaData": metaData == null
          ? null
          : List<dynamic>.from(metaData!.map((x) => x.toJson())),
    };