Correct address formatitng
This commit is contained in:
parent
41671a7363
commit
24c1c5dfad
|
|
@ -269,8 +269,16 @@ String formatAddress(
|
||||||
str += address2 + delimiter;
|
str += address2 + delimiter;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (city.isNotEmpty || state.isNotEmpty || postalCode.isNotEmpty) {
|
if (city.isNotEmpty) {
|
||||||
str += city + ',' + state + ' ' + postalCode;
|
str += city + ', ';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (state.isNotEmpty) {
|
||||||
|
str += state + ' ';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (postalCode.isNotEmpty) {
|
||||||
|
str += postalCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
return str;
|
return str;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue