Fix UI bug for free trial

This commit is contained in:
Neeraj Gupta 2022-10-26 13:28:51 +05:30
parent e04fe51036
commit 14a95bfebc
No known key found for this signature in database
GPG key ID: 3C5A1684DC1729E1
4 changed files with 4 additions and 4 deletions

View file

@ -44,7 +44,7 @@ class SkipSubscriptionWidget extends StatelessWidget {
BillingService.instance BillingService.instance
.verifySubscription(freeProductID, "", paymentProvider: "ente"); .verifySubscription(freeProductID, "", paymentProvider: "ente");
}, },
child: const Text("Continue on free plan"), child: const Text("Continue on free trial"),
), ),
); );
} }

View file

@ -94,7 +94,7 @@ class ValidityWidget extends StatelessWidget {
); );
var message = "Renews on $endDate"; var message = "Renews on $endDate";
if (currentSubscription.productID == freeProductID) { if (currentSubscription.productID == freeProductID) {
message = "Free plan valid till $endDate"; message = "Free trial valid till $endDate";
} else if (currentSubscription.attributes?.isCancelled ?? false) { } else if (currentSubscription.attributes?.isCancelled ?? false) {
message = "Your subscription will be cancelled on $endDate"; message = "Your subscription will be cancelled on $endDate";
} }

View file

@ -368,7 +368,7 @@ class _SubscriptionPageState extends State<SubscriptionPage> {
planWidgets.add( planWidgets.add(
SubscriptionPlanWidget( SubscriptionPlanWidget(
storage: _freePlan.storage, storage: _freePlan.storage,
price: "free", price: "Free trial",
period: "", period: "",
isActive: true, isActive: true,
), ),

View file

@ -19,7 +19,7 @@ class SubscriptionPlanWidget extends StatelessWidget {
String _displayPrice() { String _displayPrice() {
final result = price + (period.isNotEmpty ? " / " + period : ""); final result = price + (period.isNotEmpty ? " / " + period : "");
return result.isNotEmpty ? result : "Trial plan"; return price.isNotEmpty ? result : "Free trial";
} }
@override @override