create static method
Call
create({
- bool schemeUtilsIsSetDefaultData = false,
- String special_type = "call",
- String special_return_type = "call",
- num? id,
- num? user_id,
- bool? is_outgoing,
- bool? is_video,
- CallState? state,
- num? group_call_id,
override
Generate By AZKADEV | Azka Axelion Gibran Script Dont edit by hand or anything manual
Implementation
static Call create({
bool schemeUtilsIsSetDefaultData = false,
String special_type = "call",
String special_return_type = "call",
num? id,
num? user_id,
bool? is_outgoing,
bool? is_video,
CallState? state,
num? group_call_id,
}) {
// Call call = Call({
final Map call_data_create_json = {
"@type": special_type,
"@return_type": special_return_type,
"id": id,
"user_id": user_id,
"is_outgoing": is_outgoing,
"is_video": is_video,
"state": (state != null) ? state.toJson() : null,
"group_call_id": group_call_id,
};
call_data_create_json.removeWhere((key, value) => value == null);
if (schemeUtilsIsSetDefaultData) {
defaultData.forEach((key, value) {
if (call_data_create_json.containsKey(key) == false) {
call_data_create_json[key] = value;
}
});
}
return Call(call_data_create_json);
}