fromMap static method
override
Construct from Map.
Implementation
static ChatStatisticsChannel? 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 mean_view_count = StatisticalValue.fromMap(_map['mean_view_count'])!;
var mean_share_count = StatisticalValue.fromMap(_map['mean_share_count'])!;
var enabled_notifications_percentage =
_map['enabled_notifications_percentage']! as double;
var member_count_graph =
StatisticalGraph.fromMap(_map['member_count_graph'])!;
var join_graph = StatisticalGraph.fromMap(_map['join_graph'])!;
var mute_graph = StatisticalGraph.fromMap(_map['mute_graph'])!;
var view_count_by_hour_graph =
StatisticalGraph.fromMap(_map['view_count_by_hour_graph'])!;
var view_count_by_source_graph =
StatisticalGraph.fromMap(_map['view_count_by_source_graph'])!;
var join_by_source_graph =
StatisticalGraph.fromMap(_map['join_by_source_graph'])!;
var language_graph = StatisticalGraph.fromMap(_map['language_graph'])!;
var message_interaction_graph =
StatisticalGraph.fromMap(_map['message_interaction_graph'])!;
var instant_view_interaction_graph =
StatisticalGraph.fromMap(_map['instant_view_interaction_graph'])!;
var recent_message_interactions =
List<ChatStatisticsMessageInteractionInfo>.from(
(_map["recent_message_interactions"] ?? []).map(
(e) => ChatStatisticsMessageInteractionInfo.fromMap(e),
),
);
return ChatStatisticsChannel(
extra: extra,
clientId: clientId,
period: period,
member_count: member_count,
mean_view_count: mean_view_count,
mean_share_count: mean_share_count,
enabled_notifications_percentage: enabled_notifications_percentage,
member_count_graph: member_count_graph,
join_graph: join_graph,
mute_graph: mute_graph,
view_count_by_hour_graph: view_count_by_hour_graph,
view_count_by_source_graph: view_count_by_source_graph,
join_by_source_graph: join_by_source_graph,
language_graph: language_graph,
message_interaction_graph: message_interaction_graph,
instant_view_interaction_graph: instant_view_interaction_graph,
recent_message_interactions: recent_message_interactions,
);
}