getAddressLine2 method
Implementation
String getAddressLine2() {
String addressLine2 = "";
bool insertComma = false;
if (state != null && state!.isNotEmpty) {
addressLine2 += state!;
insertComma = true;
}
if (postalCode != null && postalCode!.isNotEmpty) {
if (insertComma) {
addressLine2 += ", ";
}
addressLine2 += postalCode!;
insertComma = true;
}
if (country != null && country!.isNotEmpty) {
if (insertComma) {
addressLine2 += ", ";
}
addressLine2 += country!;
insertComma = true;
}
return addressLine2;
}