ForumTopic.fromJson constructor

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

Parses a ForumTopic from TDLib JSON.

Implementation

factory ForumTopic.fromJson(Map<String, dynamic> json) => ForumTopic(
  info: _readObject(json['info'], ForumTopicInfo.fromJson),
  lastMessage: _readOptional(json['last_message'], Message.fromJson),
  order: _readInt(json['order']),
  isPinned: _readBool(json['is_pinned']),
  unreadCount: _readInt(json['unread_count']),
  lastReadInboxMessageId: _readInt(json['last_read_inbox_message_id']),
  lastReadOutboxMessageId: _readInt(json['last_read_outbox_message_id']),
  unreadMentionCount: _readInt(json['unread_mention_count']),
  unreadReactionCount: _readInt(json['unread_reaction_count']),
  unreadPollVoteCount: _readInt(json['unread_poll_vote_count']),
  notificationSettings: _readObject(
    json['notification_settings'],
    ChatNotificationSettings.fromJson,
  ),
  draftMessage: _readOptional(json['draft_message'], DraftMessage.fromJson),
  extra: json['@extra'],
  clientId: _readClientId(json['@client_id']),
);