Correct address formatitng

This commit is contained in:
Hillel Coren 2021-09-17 09:10:51 +03:00
parent 41671a7363
commit 24c1c5dfad
1 changed files with 10 additions and 2 deletions

View File

@ -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;