create static method
Chat
create({
- bool schemeUtilsIsSetDefaultData = false,
- String special_type = "chat",
- String? id,
- String? first_name,
- String? type,
override
Generated
Implementation
static Chat create({
bool schemeUtilsIsSetDefaultData = false,
String special_type = "chat",
String? id,
String? first_name,
String? type,
}) {
// Chat chat = Chat({
final Map chat_data_create_json = {
"@type": special_type,
"id": id,
"first_name": first_name,
"type": type,
};
chat_data_create_json.removeWhere((key, value) => value == null);
if (schemeUtilsIsSetDefaultData) {
defaultData.forEach((key, value) {
if (chat_data_create_json.containsKey(key) == false) {
chat_data_create_json[key] = value;
}
});
}
return Chat(chat_data_create_json);
}