ForumTopic.fromJson constructor

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

Parse from a json

Implementation

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