create static method
Address
create({
- bool schemeUtilsIsSetDefaultData = false,
- String special_type = "address",
- String special_return_type = "address",
- String? country_code,
- String? state,
- String? city,
- String? street_line1,
- String? street_line2,
- String? postal_code,
override
Generate By AZKADEV | Azka Axelion Gibran Script Dont edit by hand or anything manual
Implementation
static Address create({
bool schemeUtilsIsSetDefaultData = false,
String special_type = "address",
String special_return_type = "address",
String? country_code,
String? state,
String? city,
String? street_line1,
String? street_line2,
String? postal_code,
}) {
// Address address = Address({
final Map address_data_create_json = {
"@type": special_type,
"@return_type": special_return_type,
"country_code": country_code,
"state": state,
"city": city,
"street_line1": street_line1,
"street_line2": street_line2,
"postal_code": postal_code,
};
address_data_create_json.removeWhere((key, value) => value == null);
if (schemeUtilsIsSetDefaultData) {
defaultData.forEach((key, value) {
if (address_data_create_json.containsKey(key) == false) {
address_data_create_json[key] = value;
}
});
}
return Address(address_data_create_json);
}