create static method

ChatStatistics create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "chatStatistics",
  3. bool special_is_json_scheme_class = true,
  4. String special_return_type = "chatStatistics",
  5. ChatStatisticsSupergroup? chat_statistics_supergroup,
  6. ChatStatisticsChannel? chat_statistics_channel,
})
override

Generate By AZKADEV | Azka Axelion Gibran Script Dont edit by hand or anything manual

Implementation

static ChatStatistics create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "chatStatistics",
  bool special_is_json_scheme_class = true,
  String special_return_type = "chatStatistics",
  ChatStatisticsSupergroup? chat_statistics_supergroup,
  ChatStatisticsChannel? chat_statistics_channel,
}) {
  // ChatStatistics chatStatistics = ChatStatistics({
  final Map chatStatistics_data_create_json = {
    "@type": special_type,
    "@is_json_scheme_class": special_is_json_scheme_class,
    "@return_type": special_return_type,
    "chat_statistics_supergroup": (chat_statistics_supergroup != null) ? chat_statistics_supergroup.toJson() : null,
    "chat_statistics_channel": (chat_statistics_channel != null) ? chat_statistics_channel.toJson() : null,
  };

  chatStatistics_data_create_json.removeWhere((key, value) => value == null);

  if (schemeUtilsIsSetDefaultData) {
    defaultData.forEach((key, value) {
      if (chatStatistics_data_create_json.containsKey(key) == false) {
        chatStatistics_data_create_json[key] = value;
      }
    });
  }
  return ChatStatistics(chatStatistics_data_create_json);
}