ChatStatisticsSupergroup.fromJson constructor

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

Parse from a json

Implementation

factory ChatStatisticsSupergroup.fromJson(Map<String, dynamic> json) => ChatStatisticsSupergroup(
  period: DateRange.fromJson(json['period']),
  memberCount: StatisticalValue.fromJson(json['member_count']),
  messageCount: StatisticalValue.fromJson(json['message_count']),
  viewerCount: StatisticalValue.fromJson(json['viewer_count']),
  senderCount: StatisticalValue.fromJson(json['sender_count']),
  memberCountGraph: StatisticalGraph.fromJson(json['member_count_graph']),
  joinGraph: StatisticalGraph.fromJson(json['join_graph']),
  joinBySourceGraph: StatisticalGraph.fromJson(json['join_by_source_graph']),
  languageGraph: StatisticalGraph.fromJson(json['language_graph']),
  messageContentGraph: StatisticalGraph.fromJson(json['message_content_graph']),
  actionGraph: StatisticalGraph.fromJson(json['action_graph']),
  dayGraph: StatisticalGraph.fromJson(json['day_graph']),
  weekGraph: StatisticalGraph.fromJson(json['week_graph']),
  topSenders: List<ChatStatisticsMessageSenderInfo>.from((json['top_senders'] ?? []).map((item) => ChatStatisticsMessageSenderInfo.fromJson(item)).toList()),
  topAdministrators: List<ChatStatisticsAdministratorActionsInfo>.from((json['top_administrators'] ?? []).map((item) => ChatStatisticsAdministratorActionsInfo.fromJson(item)).toList()),
  topInviters: List<ChatStatisticsInviterInfo>.from((json['top_inviters'] ?? []).map((item) => ChatStatisticsInviterInfo.fromJson(item)).toList()),
  extra: json['@extra'],
  clientId: json['@client_id'],
);