ChatStatisticsChannel.fromJson constructor

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

Parses a ChatStatisticsChannel from TDLib JSON.

Implementation

factory ChatStatisticsChannel.fromJson(Map<String, dynamic> json) =>
    ChatStatisticsChannel(
      period: _readObject(json['period'], DateRange.fromJson),
      memberCount:
          _readObject(json['member_count'], StatisticalValue.fromJson),
      meanMessageViewCount: _readObject(
          json['mean_message_view_count'], StatisticalValue.fromJson),
      meanMessageShareCount: _readObject(
          json['mean_message_share_count'], StatisticalValue.fromJson),
      meanMessageReactionCount: _readObject(
          json['mean_message_reaction_count'], StatisticalValue.fromJson),
      meanStoryViewCount: _readObject(
          json['mean_story_view_count'], StatisticalValue.fromJson),
      meanStoryShareCount: _readObject(
          json['mean_story_share_count'], StatisticalValue.fromJson),
      meanStoryReactionCount: _readObject(
          json['mean_story_reaction_count'], StatisticalValue.fromJson),
      enabledNotificationsPercentage:
          _readDouble(json['enabled_notifications_percentage']),
      memberCountGraph:
          _readObject(json['member_count_graph'], StatisticalGraph.fromJson),
      joinGraph: _readObject(json['join_graph'], StatisticalGraph.fromJson),
      muteGraph: _readObject(json['mute_graph'], StatisticalGraph.fromJson),
      viewCountByHourGraph: _readObject(
          json['view_count_by_hour_graph'], StatisticalGraph.fromJson),
      viewCountBySourceGraph: _readObject(
          json['view_count_by_source_graph'], StatisticalGraph.fromJson),
      joinBySourceGraph: _readObject(
          json['join_by_source_graph'], StatisticalGraph.fromJson),
      languageGraph:
          _readObject(json['language_graph'], StatisticalGraph.fromJson),
      messageInteractionGraph: _readObject(
          json['message_interaction_graph'], StatisticalGraph.fromJson),
      messageReactionGraph: _readObject(
          json['message_reaction_graph'], StatisticalGraph.fromJson),
      storyInteractionGraph: _readObject(
          json['story_interaction_graph'], StatisticalGraph.fromJson),
      storyReactionGraph: _readObject(
          json['story_reaction_graph'], StatisticalGraph.fromJson),
      instantViewInteractionGraph: _readObject(
          json['instant_view_interaction_graph'], StatisticalGraph.fromJson),
      recentInteractions: _readList<ChatStatisticsInteractionInfo>(
          json['recent_interactions'],
          (e) => _readObject(e, ChatStatisticsInteractionInfo.fromJson)),
      extra: json['@extra'],
      clientId: _readClientId(json['@client_id']),
    );