ChatStatistics.fromJson constructor

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

a ChatStatistics return type can be :

Implementation

factory ChatStatistics.fromJson(Map<String, dynamic> json) {
  switch (json["@type"]) {
    case ChatStatisticsSupergroup.CONSTRUCTOR:
      return ChatStatisticsSupergroup.fromJson(json);
    case ChatStatisticsChannel.CONSTRUCTOR:
      return ChatStatisticsChannel.fromJson(json);
    default:
      return const ChatStatistics();
  }
}