From fffebec025dc6bca6767a4848ac0f0325e025fc9 Mon Sep 17 00:00:00 2001 From: Neeraj Gupta <254676+ua741@users.noreply.github.com> Date: Sat, 21 Sep 2024 09:40:29 +0530 Subject: [PATCH] [mob] Fix sub price order --- .../ui/payment/subscription_plan_widget.dart | 30 ++++++++++++++----- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/mobile/lib/ui/payment/subscription_plan_widget.dart b/mobile/lib/ui/payment/subscription_plan_widget.dart index 185c4e0462..6bb2ecf3ee 100644 --- a/mobile/lib/ui/payment/subscription_plan_widget.dart +++ b/mobile/lib/ui/payment/subscription_plan_widget.dart @@ -2,6 +2,7 @@ import "package:flutter/foundation.dart"; import 'package:flutter/material.dart'; import "package:flutter/scheduler.dart"; import "package:flutter_animate/flutter_animate.dart"; +import "package:photos/services/update_service.dart"; import "package:photos/theme/colors.dart"; import "package:photos/theme/ente_theme.dart"; import 'package:photos/utils/data_util.dart'; @@ -162,17 +163,30 @@ class _Price extends StatelessWidget { final priceDouble = double.parse(priceWithoutCurrency); final pricePerMonth = priceDouble / 12; final pricePerMonthString = pricePerMonth.toStringAsFixed(2); + final bool isPlayStore = !UpdateService.instance.isPlayStoreFlavor(); return Column( crossAxisAlignment: CrossAxisAlignment.end, children: [ - Text( - currencySymbol + pricePerMonthString + ' / ' + 'month', - style: textTheme.largeBold.copyWith(color: textBaseLight), - ), - Text( - price + " / " + "yr", - style: textTheme.small.copyWith(color: textFaintLight), - ), + if (isPlayStore) + Text( + price + " / " + "yr", + style: textTheme.largeBold.copyWith(color: textBaseLight), + ), + if (isPlayStore) + Text( + currencySymbol + pricePerMonthString + ' / ' + 'month', + style: textTheme.small.copyWith(color: textFaintLight), + ), + if (!isPlayStore) + Text( + currencySymbol + pricePerMonthString + ' / ' + 'month', + style: textTheme.largeBold.copyWith(color: textBaseLight), + ), + if (!isPlayStore) + Text( + price + " / " + "yr", + style: textTheme.small.copyWith(color: textFaintLight), + ), ], ) .animate(delay: const Duration(milliseconds: 100))