|
|
@@ -28,6 +28,9 @@ class DiscountPage extends BasePage<DiscountController> {
|
|
|
bool isFreeItem =
|
|
|
(controller.currentSelectedStoreItem.value?.freeTrialName != null);
|
|
|
bool isShowFree = isFreeItem && controller.isFree.value;
|
|
|
+
|
|
|
+ bool hasUsedFreeTrial = false;
|
|
|
+ bool canShowFreeTrial = isFreeItem && !hasUsedFreeTrial;
|
|
|
return Scaffold(
|
|
|
backgroundColor: "#05050D".color,
|
|
|
body: Stack(
|
|
|
@@ -46,7 +49,7 @@ class DiscountPage extends BasePage<DiscountController> {
|
|
|
_DiscountFreeTrialSpecialRow(
|
|
|
title: '3-DAY FREE TRIAL',
|
|
|
desc: 'Then \$6.99/week only \$0.54/day',
|
|
|
- isSelected: isFreeItem,
|
|
|
+ isSelected: canShowFreeTrial,
|
|
|
onSelect: (title) {
|
|
|
if (isFreeItem) {
|
|
|
controller.currentSelectedStoreItem.value = null;
|
|
|
@@ -87,7 +90,7 @@ class DiscountPage extends BasePage<DiscountController> {
|
|
|
height: 20.h,
|
|
|
),
|
|
|
_PurchaseSection(
|
|
|
- isShowFree: isShowFree,
|
|
|
+ isShowFree: canShowFreeTrial,
|
|
|
controller: controller,
|
|
|
),
|
|
|
],
|
|
|
@@ -220,24 +223,14 @@ class _PurchaseSection extends StatelessWidget {
|
|
|
children: [
|
|
|
Text(
|
|
|
isShowFree
|
|
|
- ? controller.currentSelectedStoreItem.value?.freeTrialName ?? ""
|
|
|
- : controller.currentSelectedStoreItem.value?.name ?? "",
|
|
|
- style: TextStyle(
|
|
|
- color: Colors.white,
|
|
|
- fontSize: 16.sp,
|
|
|
- fontWeight: FontWeight.w500,
|
|
|
- ),
|
|
|
- ),
|
|
|
- Text(
|
|
|
- isShowFree
|
|
|
- ? controller.currentSelectedStoreItem.value?.freeTrialPriceDesc ?? ""
|
|
|
- : controller.currentSelectedStoreItem.value?.priceDesc ?? "",
|
|
|
+ ? ""
|
|
|
+ : "Auto-renewalable.Cancel anytime",
|
|
|
style: TextStyle(
|
|
|
- color: Colors.white,
|
|
|
- fontSize: 13.sp,
|
|
|
+ color: Colors.white.withOpacity(0.8),
|
|
|
+ fontSize: 12.sp,
|
|
|
),
|
|
|
),
|
|
|
- SizedBox(height: 14.h),
|
|
|
+ SizedBox(height: 1.h),
|
|
|
GestureDetector(
|
|
|
onTap: () {
|
|
|
controller.onBuyClick();
|
|
|
@@ -253,7 +246,7 @@ class _PurchaseSection extends StatelessWidget {
|
|
|
),
|
|
|
child: Center(
|
|
|
child: Text(
|
|
|
- isShowFree ? "START FREE TRIAL" : "START NOW",
|
|
|
+ isShowFree ? "START FREE TRIAL" : "Continue",
|
|
|
style: TextStyle(
|
|
|
color: Colors.white,
|
|
|
fontWeight: FontWeight.w700,
|
|
|
@@ -264,14 +257,39 @@ class _PurchaseSection extends StatelessWidget {
|
|
|
),
|
|
|
),
|
|
|
SizedBox(height: 5.h),
|
|
|
- Text(
|
|
|
- isShowFree ? "No payment now!" : "Cancel anytime",
|
|
|
+ isShowFree ?
|
|
|
+ Text("No payment now!",
|
|
|
style: TextStyle(
|
|
|
- color: isShowFree ? "#57C87A".color : Colors.white,
|
|
|
+ color: "#57C87A".color,
|
|
|
fontSize: 12.sp,
|
|
|
fontWeight: FontWeight.w500,
|
|
|
),
|
|
|
- ),
|
|
|
+ )
|
|
|
+ :
|
|
|
+ Container(
|
|
|
+ alignment: Alignment.center,
|
|
|
+ width: double.infinity,
|
|
|
+ child: Row(
|
|
|
+ mainAxisAlignment: MainAxisAlignment.center,
|
|
|
+ children: [
|
|
|
+ GestureDetector(
|
|
|
+ onTap: () {
|
|
|
+ controller.onBuyClick();
|
|
|
+ },
|
|
|
+ child: Text("Privacy Policy", style: TextStyle(color: Colors.white.withOpacity(0.8), fontSize: 12.sp, fontWeight: FontWeight.w400)),
|
|
|
+ ),
|
|
|
+ SizedBox(width: 8.w),
|
|
|
+ Text("|", style: TextStyle(color: Colors.white.withOpacity(0.8), fontSize: 12.sp, fontWeight: FontWeight.w400)),
|
|
|
+ SizedBox(width: 8.w),
|
|
|
+ GestureDetector(
|
|
|
+ onTap: () {
|
|
|
+ controller.onBuyClick();
|
|
|
+ },
|
|
|
+ child: Text("Privacy Policy", style: TextStyle(color: Colors.white.withOpacity(0.8), fontSize: 12.sp, fontWeight: FontWeight.w400)),
|
|
|
+ ),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ )
|
|
|
],
|
|
|
);
|
|
|
}
|
|
|
@@ -427,9 +445,4 @@ class _DiscountFreeTrialSpecialRow extends StatelessWidget {
|
|
|
),
|
|
|
);
|
|
|
}
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+}
|