fromJson static method
Implementation
static ForumTopics? fromJson(Map<String, dynamic>? json) {
if (json == null) {
return null;
}
return ForumTopics(
totalCount: (json['total_count'] as int?) ?? 0,
topics: List<ForumTopic>.from(
tdListFromJson(json['topics'])
.map((item) => ForumTopic.fromJson(tdMapFromJson(item)))
.whereType<ForumTopic>(),
),
nextOffsetDate: (json['next_offset_date'] as int?) ?? 0,
nextOffsetMessageId: (json['next_offset_message_id'] as int?) ?? 0,
nextOffsetForumTopicId: (json['next_offset_forum_topic_id'] as int?) ?? 0,
);
}