create static method
TelegramClientLibraryClientData
create({
- bool schemeUtilsIsSetDefaultData = false,
- String special_type = "telegramClientLibraryClientData",
- num? id,
- String? created_at,
- num? client_tg_user_id,
- String? client_title,
- String? client_token,
- num? owner_user_id,
- String? client_type,
- Object? from_bot_type,
- bool? can_join_groups,
- bool? can_read_all_group_messages,
- num? from_bot_user_id,
- num? expire_date,
- String? client_username,
- String? version,
- num? client_id,
- String? client_data,
override
return original data json
Implementation
static TelegramClientLibraryClientData create({
bool schemeUtilsIsSetDefaultData = false,
String special_type = "telegramClientLibraryClientData",
num? id,
String? created_at,
num? client_tg_user_id,
String? client_title,
String? client_token,
num? owner_user_id,
String? client_type,
Object? from_bot_type,
bool? can_join_groups,
bool? can_read_all_group_messages,
num? from_bot_user_id,
num? expire_date,
String? client_username,
String? version,
num? client_id,
String? client_data,
}) {
// TelegramClientLibraryClientData telegramClientLibraryClientData = TelegramClientLibraryClientData({
final Map telegramClientLibraryClientData_data_create_json = {
"@type": special_type,
"id": id,
"created_at": created_at,
"client_tg_user_id": client_tg_user_id,
"client_title": client_title,
"client_token": client_token,
"owner_user_id": owner_user_id,
"client_type": client_type,
"from_bot_type": from_bot_type,
"can_join_groups": can_join_groups,
"can_read_all_group_messages": can_read_all_group_messages,
"from_bot_user_id": from_bot_user_id,
"expire_date": expire_date,
"client_username": client_username,
"version": version,
"client_id": client_id,
"client_data": client_data,
};
telegramClientLibraryClientData_data_create_json
.removeWhere((key, value) => value == null);
if (schemeUtilsIsSetDefaultData) {
defaultData.forEach((key, value) {
if (telegramClientLibraryClientData_data_create_json.containsKey(key) ==
false) {
telegramClientLibraryClientData_data_create_json[key] = value;
}
});
}
return TelegramClientLibraryClientData(
telegramClientLibraryClientData_data_create_json);
}