create static method

ChatSource create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "chatSource",
  3. bool special_is_json_scheme_class = true,
  4. String special_return_type = "chatSource",
  5. ChatSourceMtprotoProxy? chat_source_mtproto_proxy,
  6. ChatSourcePublicServiceAnnouncement? chat_source_public_service_announcement,
})
override

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

Implementation

static ChatSource create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "chatSource",
  bool special_is_json_scheme_class = true,
  String special_return_type = "chatSource",
  ChatSourceMtprotoProxy? chat_source_mtproto_proxy,
  ChatSourcePublicServiceAnnouncement? chat_source_public_service_announcement,
}) {
  // ChatSource chatSource = ChatSource({
  final Map chatSource_data_create_json = {
    "@type": special_type,
    "@is_json_scheme_class": special_is_json_scheme_class,
    "@return_type": special_return_type,
    "chat_source_mtproto_proxy": (chat_source_mtproto_proxy != null) ? chat_source_mtproto_proxy.toJson() : null,
    "chat_source_public_service_announcement": (chat_source_public_service_announcement != null) ? chat_source_public_service_announcement.toJson() : null,
  };

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

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