From 24c1c5dfadae12f17441c8569af8a52e6c3ce76f Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Fri, 17 Sep 2021 09:10:51 +0300 Subject: [PATCH] Correct address formatitng --- lib/utils/formatting.dart | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/utils/formatting.dart b/lib/utils/formatting.dart index 31fd0b768..b4fdfb465 100644 --- a/lib/utils/formatting.dart +++ b/lib/utils/formatting.dart @@ -269,8 +269,16 @@ String formatAddress( str += address2 + delimiter; } - if (city.isNotEmpty || state.isNotEmpty || postalCode.isNotEmpty) { - str += city + ',' + state + ' ' + postalCode; + if (city.isNotEmpty) { + str += city + ', '; + } + + if (state.isNotEmpty) { + str += state + ' '; + } + + if (postalCode.isNotEmpty) { + str += postalCode; } return str;