create static method
TelegramClientLibraryError
create({
- bool schemeUtilsIsSetDefaultData = false,
- String special_type = "telegramClientLibraryError",
- num? code,
- String? message,
- String? description,
- 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);
}