getMap method

Map<String, dynamic> getMap(
  1. WKConversationMsg msg,
  2. bool isSync
)

Implementation

Map<String, dynamic> getMap(WKConversationMsg msg, bool isSync) {
  Map<String, dynamic> data = HashMap<String, Object>();
  data['channel_id'] = msg.channelID;
  data['channel_type'] = msg.channelType;
  data['last_client_msg_no'] = msg.lastClientMsgNO;
  data['last_msg_timestamp'] = msg.lastMsgTimestamp;
  data['last_msg_seq'] = msg.lastMsgSeq;
  data['unread_count'] = msg.unreadCount;
  data['parent_channel_id'] = msg.parentChannelID;
  data['parent_channel_type'] = msg.parentChannelType;
  data['is_deleted'] = msg.isDeleted;
  data['extra'] = msg.localExtraMap?.toString() ?? "";
  if (isSync) {
    data['version'] = msg.version;
  }
  return data;
}