|
...
|
...
|
@@ -10,7 +10,6 @@ import '../purchase_route_args.dart'; |
|
|
|
import '../widgets/purchase_bottom_bar.dart';
|
|
|
|
import '../widgets/purchase_colors.dart';
|
|
|
|
import '../widgets/purchase_plan_card.dart';
|
|
|
|
import '../widgets/refund_explanation_bottom_sheet.dart';
|
|
|
|
|
|
|
|
class PurchaseView extends GetView<PurchaseController> {
|
|
|
|
const PurchaseView({super.key});
|
|
...
|
...
|
@@ -18,79 +17,79 @@ class PurchaseView extends GetView<PurchaseController> { |
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return PopScope(
|
|
|
|
canPop: !controller.isFromOnboard,
|
|
|
|
onPopInvokedWithResult: (didPop, _) {
|
|
|
|
if (!didPop) controller.onBackPressed();
|
|
|
|
},
|
|
|
|
child: AnnotatedRegion<SystemUiOverlayStyle>(
|
|
|
|
value: const SystemUiOverlayStyle(
|
|
|
|
statusBarColor: Colors.transparent,
|
|
|
|
statusBarIconBrightness: Brightness.dark,
|
|
|
|
statusBarBrightness: Brightness.light,
|
|
|
|
systemNavigationBarColor: PurchaseColors.background,
|
|
|
|
systemNavigationBarIconBrightness: Brightness.dark,
|
|
|
|
),
|
|
|
|
child: Scaffold(
|
|
|
|
backgroundColor: PurchaseColors.background,
|
|
|
|
body: Stack(
|
|
|
|
children: [
|
|
|
|
Positioned.fill(
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
controller: controller.scrollController,
|
|
|
|
physics: const ClampingScrollPhysics(),
|
|
|
|
padding: const EdgeInsets.only(bottom: 170),
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
const _HeroHeader(),
|
|
|
|
Padding(
|
|
|
|
padding: const EdgeInsets.only(left: 18, top: 9),
|
|
|
|
child: Text(
|
|
|
|
context.l10n.purchaseHeroTitle,
|
|
|
|
style: const TextStyle(
|
|
|
|
color: Colors.black,
|
|
|
|
fontSize: 24,
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
height: 1.2,
|
|
|
|
canPop: !controller.isFromOnboard,
|
|
|
|
onPopInvokedWithResult: (didPop, _) {
|
|
|
|
if (!didPop) controller.onBackPressed();
|
|
|
|
},
|
|
|
|
child: AnnotatedRegion<SystemUiOverlayStyle>(
|
|
|
|
value: const SystemUiOverlayStyle(
|
|
|
|
statusBarColor: Colors.transparent,
|
|
|
|
statusBarIconBrightness: Brightness.dark,
|
|
|
|
statusBarBrightness: Brightness.light,
|
|
|
|
systemNavigationBarColor: PurchaseColors.background,
|
|
|
|
systemNavigationBarIconBrightness: Brightness.dark,
|
|
|
|
),
|
|
|
|
child: Scaffold(
|
|
|
|
backgroundColor: PurchaseColors.background,
|
|
|
|
body: Stack(
|
|
|
|
children: [
|
|
|
|
Positioned.fill(
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
controller: controller.scrollController,
|
|
|
|
physics: const ClampingScrollPhysics(),
|
|
|
|
padding: const EdgeInsets.only(bottom: 170),
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
const _HeroHeader(),
|
|
|
|
Padding(
|
|
|
|
padding: const EdgeInsets.only(left: 18, top: 9),
|
|
|
|
child: Text(
|
|
|
|
context.l10n.purchaseHeroTitle,
|
|
|
|
style: const TextStyle(
|
|
|
|
color: Colors.black,
|
|
|
|
fontSize: 24,
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
height: 1.2,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
const SizedBox(height: 26),
|
|
|
|
_PlanScroller(controller: controller),
|
|
|
|
const SizedBox(height: 22),
|
|
|
|
_SectionTitle(context.l10n.purchaseBenefitsTitle),
|
|
|
|
const SizedBox(height: 14),
|
|
|
|
const PremiumBenefitListView(),
|
|
|
|
const SizedBox(height: 24),
|
|
|
|
_LegalNotes(controller: controller),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
const SizedBox(height: 26),
|
|
|
|
_PlanScroller(controller: controller),
|
|
|
|
const SizedBox(height: 22),
|
|
|
|
_SectionTitle(context.l10n.purchaseBenefitsTitle),
|
|
|
|
const SizedBox(height: 14),
|
|
|
|
const PremiumBenefitListView(),
|
|
|
|
const SizedBox(height: 24),
|
|
|
|
_LegalNotes(controller: controller),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Positioned(
|
|
|
|
left: 0,
|
|
|
|
right: 0,
|
|
|
|
top: 0,
|
|
|
|
child: _PurchaseNavigationBar(controller: controller),
|
|
|
|
),
|
|
|
|
Positioned(
|
|
|
|
left: 0,
|
|
|
|
right: 0,
|
|
|
|
bottom: 0,
|
|
|
|
child: Obx(
|
|
|
|
() => PurchaseBottomBar(
|
|
|
|
label: context.l10n.purchaseUnlockNow,
|
|
|
|
loading: controller.isUnlocking.value,
|
|
|
|
onPressed: controller.unlock,
|
|
|
|
onTermsTap: controller.openUserTerms,
|
|
|
|
onPrivacyTap: controller.openPrivacyPolicy,
|
|
|
|
Positioned(
|
|
|
|
left: 0,
|
|
|
|
right: 0,
|
|
|
|
top: 0,
|
|
|
|
child: _PurchaseNavigationBar(controller: controller),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Positioned(
|
|
|
|
left: 0,
|
|
|
|
right: 0,
|
|
|
|
bottom: 0,
|
|
|
|
child: Obx(
|
|
|
|
() => PurchaseBottomBar(
|
|
|
|
label: context.l10n.purchaseUnlockNow,
|
|
|
|
loading: controller.isUnlocking.value,
|
|
|
|
onPressed: controller.unlock,
|
|
|
|
onTermsTap: controller.openUserTerms,
|
|
|
|
onPrivacyTap: controller.openPrivacyPolicy,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
));
|
|
|
|
),
|
|
|
|
));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
...
|
...
|
@@ -256,7 +255,7 @@ class _LegalNotes extends StatelessWidget { |
|
|
|
text: context.l10n.purchaseNoteSubscription,
|
|
|
|
linkText: '了解更多',
|
|
|
|
linkSuffix: '。',
|
|
|
|
onLinkTap: showRefundExplanationBottomSheet,
|
|
|
|
onLinkTap: controller.openRefundExplanation,
|
|
|
|
),
|
|
|
|
const SizedBox(height: 12),
|
|
|
|
_LegalText(
|
...
|
...
|
|