MessageThreadInfo.fromJson constructor

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

Parse from a json

Implementation

factory MessageThreadInfo.fromJson(Map<String, dynamic> json) => MessageThreadInfo(
  chatId: json['chat_id'],
  messageThreadId: json['message_thread_id'],
  replyInfo: MessageReplyInfo.fromJson(json['reply_info']),
  unreadMessageCount: json['unread_message_count'],
  messages: List<Message>.from((json['messages'] ?? []).map((item) => Message.fromJson(item)).toList()),
  draftMessage: json['draft_message'] == null ? null : DraftMessage.fromJson(json['draft_message']),
  extra: json['@extra'],
  clientId: json['@client_id'],
);