create static method

DownloadFile create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "downloadFile",
  3. String special_return_type = "file",
  4. bool? is_tdlib_method,
  5. num? file_id,
  6. num? priority,
  7. num? offset,
  8. num? limit,
  9. bool? synchronous,
})
override

Generate By General Universe Script Dont edit by hand or anything manual

Implementation

static DownloadFile create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "downloadFile",
  String special_return_type = "file",
  bool? is_tdlib_method,
  num? file_id,
  num? priority,
  num? offset,
  num? limit,
  bool? synchronous,
}) {
  // DownloadFile downloadFile = DownloadFile({
  final Map downloadFile_data_create_json = {
    "@type": special_type,
    "@return_type": special_return_type,
    "is_tdlib_method": is_tdlib_method,
    "file_id": file_id,
    "priority": priority,
    "offset": offset,
    "limit": limit,
    "synchronous": synchronous,
  };

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

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