fromMap static method
override
Construct from Map.
Implementation
static ChatStatisticsSupergroup? fromMap(Map<String, dynamic>? _map) {
if (_map == null) return null;
var _ = _map["@type"];
if (_ != CONSTRUCTOR) return null;
var extra = _map['@extra'];
var clientId = _map['@clientId'];
var period = DateRange.fromMap(_map['period'])!;
var member_count = StatisticalValue.fromMap(_map['member_count'])!;
var message_count = StatisticalValue.fromMap(_map['message_count'])!;
var viewer_count = StatisticalValue.fromMap(_map['viewer_count'])!;
var sender_count = StatisticalValue.fromMap(_map['sender_count'])!;
var member_count_graph =
StatisticalGraph.fromMap(_map['member_count_graph'])!;
var join_graph = StatisticalGraph.fromMap(_map['join_graph'])!;
var join_by_source_graph =
StatisticalGraph.fromMap(_map['join_by_source_graph'])!;
var language_graph = StatisticalGraph.fromMap(_map['language_graph'])!;
var message_content_graph =
StatisticalGraph.fromMap(_map['message_content_graph'])!;
var action_graph = StatisticalGraph.fromMap(_map['action_graph'])!;
var day_graph = StatisticalGraph.fromMap(_map['day_graph'])!;
var week_graph = StatisticalGraph.fromMap(_map['week_graph'])!;
var top_senders = List<ChatStatisticsMessageSenderInfo>.from(
(_map["top_senders"] ?? []).map(
(e) => ChatStatisticsMessageSenderInfo.fromMap(e),
),
);
var top_administrators = List<ChatStatisticsAdministratorActionsInfo>.from(
(_map["top_administrators"] ?? []).map(
(e) => ChatStatisticsAdministratorActionsInfo.fromMap(e),
),
);
var top_inviters = List<ChatStatisticsInviterInfo>.from(
(_map["top_inviters"] ?? []).map(
(e) => ChatStatisticsInviterInfo.fromMap(e),
),
);
return ChatStatisticsSupergroup(
extra: extra,
clientId: clientId,
period: period,
member_count: member_count,
message_count: message_count,
viewer_count: viewer_count,
sender_count: sender_count,
member_count_graph: member_count_graph,
join_graph: join_graph,
join_by_source_graph: join_by_source_graph,
language_graph: language_graph,
message_content_graph: message_content_graph,
action_graph: action_graph,
day_graph: day_graph,
week_graph: week_graph,
top_senders: top_senders,
top_administrators: top_administrators,
top_inviters: top_inviters,
);
}