toJson method
Converts a RecentChatData instance into a JSON object.
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())),
};