create static method

TelegramClientLibraryError create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "telegramClientLibraryError",
  3. num? code,
  4. String? message,
  5. String? description,
  6. String special_extra = "",
})
override

return original data json

Implementation

static TelegramClientLibraryError create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "telegramClientLibraryError",
  num? code,
  String? message,
  String? description,
  String special_extra = "",
}) {
  // TelegramClientLibraryError telegramClientLibraryError = TelegramClientLibraryError({
  final Map telegramClientLibraryError_data_create_json = {
    "@type": special_type,
    "code": code,
    "message": message,
    "description": description,
    "@extra": special_extra,
  };

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

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