create static method
MessageLocation
create({
- bool schemeUtilsIsSetDefaultData = false,
- String special_type = "messageLocation",
- String special_return_type = "messageContent",
- Location? location,
- num? live_period,
- num? expires_in,
- num? heading,
- num? proximity_alert_radius,
override
Generate By AZKADEV | Azka Axelion Gibran Script Dont edit by hand or anything manual
Implementation
static MessageLocation create({
bool schemeUtilsIsSetDefaultData = false,
String special_type = "messageLocation",
String special_return_type = "messageContent",
Location? location,
num? live_period,
num? expires_in,
num? heading,
num? proximity_alert_radius,
}) {
// MessageLocation messageLocation = MessageLocation({
final Map messageLocation_data_create_json = {
"@type": special_type,
"@return_type": special_return_type,
"location": (location != null) ? location.toJson() : null,
"live_period": live_period,
"expires_in": expires_in,
"heading": heading,
"proximity_alert_radius": proximity_alert_radius,
};
messageLocation_data_create_json.removeWhere((key, value) => value == null);
if (schemeUtilsIsSetDefaultData) {
defaultData.forEach((key, value) {
if (messageLocation_data_create_json.containsKey(key) == false) {
messageLocation_data_create_json[key] = value;
}
});
}
return MessageLocation(messageLocation_data_create_json);
}