fromJson static method

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

Implementation

static ChatStatistics? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  switch (json['@type']) {
    case ChatStatisticsChannel.constructor:
      return ChatStatisticsChannel.fromJson(json);

    case ChatStatisticsSupergroup.constructor:
      return ChatStatisticsSupergroup.fromJson(json);

    default:
      return null;
  }
}