Address constructor
Creates a new Address instance with optional address components.
All parameters are optional and can be set individually or through the various put methods after construction.
Parameters:
city
- The city namecountry
- The country namepostalCode
- The postal/ZIP codestate
- The state or provincestreet
- The street address
Implementation
Address(
{String? city,
String? country,
String? postalCode,
String? state,
String? street}) {
if (city != null) {
addressMap["city"] = city;
}
if (country != null) {
addressMap["country"] = country;
}
if (postalCode != null) {
addressMap["postalCode"] = postalCode;
}
if (state != null) {
addressMap["state"] = state;
}
if (street != null) {
addressMap["street"] = street;
}
}