Fix UI bug for free trial
This commit is contained in:
parent
e04fe51036
commit
14a95bfebc
|
@ -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"),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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";
|
||||||
}
|
}
|
||||||
|
|
|
@ -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,
|
||||||
),
|
),
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue