From ca3c7ae5269a9340cc6873e38140eaa8e130ee29 Mon Sep 17 00:00:00 2001 From: ashilkn Date: Wed, 6 Nov 2024 19:13:44 +0530 Subject: [PATCH] [mob][photos] UI tweaks on pricing page --- mobile/lib/ui/payment/subscription_plan_widget.dart | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/mobile/lib/ui/payment/subscription_plan_widget.dart b/mobile/lib/ui/payment/subscription_plan_widget.dart index d5723e4a86..7869a3ee17 100644 --- a/mobile/lib/ui/payment/subscription_plan_widget.dart +++ b/mobile/lib/ui/payment/subscription_plan_widget.dart @@ -162,19 +162,25 @@ class _Price extends StatelessWidget { final priceWithoutCurrency = price.substring(1); final priceDouble = double.parse(priceWithoutCurrency); final pricePerMonth = priceDouble / 12; - final pricePerMonthString = pricePerMonth.toStringAsFixed(2); + String pricePerMonthString = pricePerMonth.toStringAsFixed(2); + + if (pricePerMonthString.endsWith(".00")) { + pricePerMonthString = + pricePerMonthString.substring(0, pricePerMonthString.length - 3); + } + final bool isPlayStore = updateService.isPlayStoreFlavor(); return Column( crossAxisAlignment: CrossAxisAlignment.end, children: [ if (isPlayStore) Text( - price + " / " + "yr", + currencySymbol + pricePerMonthString + ' / ' + 'month', style: textTheme.largeBold.copyWith(color: textBaseLight), ), if (isPlayStore) Text( - currencySymbol + pricePerMonthString + ' / ' + 'month', + price + " / " + "yr", style: textTheme.small.copyWith(color: textFaintLight), ), if (!isPlayStore)