|
...
|
...
|
@@ -39,118 +39,128 @@ class MembershipOfferView extends GetView<MembershipOfferController> { |
|
|
|
controller.unlock();
|
|
|
|
},
|
|
|
|
),
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
physics: const ClampingScrollPhysics(),
|
|
|
|
padding: EdgeInsets.fromLTRB(
|
|
|
|
0,
|
|
|
|
MediaQuery.paddingOf(context).top + 4,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
),
|
|
|
|
child: Stack(
|
|
|
|
children: [
|
|
|
|
IgnorePointer(
|
|
|
|
child: Lottie.asset('assets/lottie/scatter_flowers.json'),
|
|
|
|
),
|
|
|
|
Column(
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
children: [
|
|
|
|
Padding(
|
|
|
|
padding: const EdgeInsets.symmetric(horizontal: 16),
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
SizedBox(height: 48),
|
|
|
|
OnboardingTitleText(l10n.onboardingMemberTitle),
|
|
|
|
const SizedBox(height: 12),
|
|
|
|
OnboardingBodyText(
|
|
|
|
l10n.onboardingMemberBody,
|
|
|
|
fontSize: 14,
|
|
|
|
),
|
|
|
|
],
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
physics: const ClampingScrollPhysics(),
|
|
|
|
padding: EdgeInsets.fromLTRB(
|
|
|
|
0,
|
|
|
|
MediaQuery.paddingOf(context).top + 4,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
),
|
|
|
|
child: Stack(
|
|
|
|
children: [
|
|
|
|
IgnorePointer(
|
|
|
|
child: Lottie.asset(
|
|
|
|
'assets/lottie/scatter_flowers.json',
|
|
|
|
width: Get.width),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
const SizedBox(height: 12),
|
|
|
|
Image.asset(
|
|
|
|
'assets/images/user_onboarding/ic_membership_box.png'),
|
|
|
|
const SizedBox(height: 4),
|
|
|
|
Obx(() {
|
|
|
|
final yearInfo = controller.yearlyProductAppleInfo.value;
|
|
|
|
final yearProduct = controller.yearlyProduct.value;
|
|
|
|
|
|
|
|
return yearInfo == null || yearProduct == null
|
|
|
|
? const SizedBox(child: CircularProgressIndicator())
|
|
|
|
: Column(
|
|
|
|
Column(
|
|
|
|
children: [
|
|
|
|
Padding(
|
|
|
|
padding: const EdgeInsets.symmetric(horizontal: 16),
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
'原价${_originDisplayPrice(yearInfo)}/年',
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
style: const TextStyle(
|
|
|
|
color: Color(0xFFB0B0B6),
|
|
|
|
fontSize: 16,
|
|
|
|
decoration: TextDecoration.lineThrough,
|
|
|
|
decorationColor: Color(0xFFB0B0B6),
|
|
|
|
letterSpacing: 0,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
const SizedBox(height: 6),
|
|
|
|
Text(
|
|
|
|
_displayPrice(yearInfo),
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
style: TextStyle(
|
|
|
|
color: context.colors.primary,
|
|
|
|
fontSize: 28,
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
letterSpacing: 0,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
const SizedBox(height: 6),
|
|
|
|
Text(
|
|
|
|
_planSubtitle(yearProduct, yearInfo),
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
style: const TextStyle(
|
|
|
|
color: Color(0xFFB0B0B6),
|
|
|
|
fontSize: 12,
|
|
|
|
letterSpacing: 0,
|
|
|
|
),
|
|
|
|
SizedBox(height: 48),
|
|
|
|
OnboardingTitleText(l10n.onboardingMemberTitle),
|
|
|
|
const SizedBox(height: 12),
|
|
|
|
OnboardingBodyText(
|
|
|
|
l10n.onboardingMemberBody,
|
|
|
|
fontSize: 14,
|
|
|
|
),
|
|
|
|
],
|
|
|
|
);
|
|
|
|
}),
|
|
|
|
const SizedBox(height: 58),
|
|
|
|
GestureDetector(
|
|
|
|
behavior: HitTestBehavior.opaque,
|
|
|
|
onTap: () {
|
|
|
|
var arguments = {};
|
|
|
|
if (controller.isFromOnboard) {
|
|
|
|
arguments['from'] = 'onboarding';
|
|
|
|
} else {
|
|
|
|
arguments['channel_type'] =
|
|
|
|
Get.arguments?['channel_type'] ?? '';
|
|
|
|
}
|
|
|
|
Get.offNamed(Routes.PURCHASE, arguments: arguments);
|
|
|
|
},
|
|
|
|
child: Padding(
|
|
|
|
padding: const EdgeInsets.symmetric(
|
|
|
|
vertical: 12,
|
|
|
|
horizontal: 24,
|
|
|
|
),
|
|
|
|
child: Text(
|
|
|
|
l10n.onboardingMemberAllOptions,
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
style: TextStyle(
|
|
|
|
color: context.colors.textPrimary,
|
|
|
|
fontSize: 12,
|
|
|
|
decoration: TextDecoration.underline,
|
|
|
|
decorationColor: context.colors.textPrimary,
|
|
|
|
letterSpacing: 0,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
const SizedBox(height: 12),
|
|
|
|
Image.asset(
|
|
|
|
'assets/images/user_onboarding/ic_membership_box.png'),
|
|
|
|
const SizedBox(height: 4),
|
|
|
|
Obx(() {
|
|
|
|
final yearInfo =
|
|
|
|
controller.yearlyProductAppleInfo.value;
|
|
|
|
final yearProduct = controller.yearlyProduct.value;
|
|
|
|
|
|
|
|
return yearInfo == null || yearProduct == null
|
|
|
|
? const SizedBox(
|
|
|
|
child: CircularProgressIndicator())
|
|
|
|
: Column(
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
'原价${_originDisplayPrice(yearInfo)}/年',
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
style: const TextStyle(
|
|
|
|
color: Color(0xFF78787D),
|
|
|
|
fontSize: 16,
|
|
|
|
decoration:
|
|
|
|
TextDecoration.lineThrough,
|
|
|
|
decorationColor: Color(0xFF78787D),
|
|
|
|
letterSpacing: 0,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
const SizedBox(height: 6),
|
|
|
|
Text(
|
|
|
|
_displayPrice(yearInfo),
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
style: TextStyle(
|
|
|
|
color: context.colors.primary,
|
|
|
|
fontSize: 28,
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
letterSpacing: 0,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
const SizedBox(height: 6),
|
|
|
|
Text(
|
|
|
|
_planSubtitle(yearProduct, yearInfo),
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
style: const TextStyle(
|
|
|
|
color: Color(0xFF78787D),
|
|
|
|
fontSize: 12,
|
|
|
|
letterSpacing: 0,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
);
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
GestureDetector(
|
|
|
|
behavior: HitTestBehavior.opaque,
|
|
|
|
onTap: () {
|
|
|
|
var arguments = {};
|
|
|
|
if (controller.isFromOnboard) {
|
|
|
|
arguments['from'] = 'onboarding';
|
|
|
|
} else {
|
|
|
|
arguments['channel_type'] =
|
|
|
|
Get.arguments?['channel_type'] ?? '';
|
|
|
|
}
|
|
|
|
Get.offNamed(Routes.PURCHASE, arguments: arguments);
|
|
|
|
},
|
|
|
|
child: Padding(
|
|
|
|
padding: const EdgeInsets.symmetric(
|
|
|
|
vertical: 12,
|
|
|
|
horizontal: 24,
|
|
|
|
),
|
|
|
|
child: Text(
|
|
|
|
l10n.onboardingMemberAllOptions,
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
style: TextStyle(
|
|
|
|
color: context.colors.textPrimary,
|
|
|
|
fontSize: 12,
|
|
|
|
decoration: TextDecoration.underline,
|
|
|
|
decorationColor: context.colors.textPrimary,
|
|
|
|
letterSpacing: 0,
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
const SizedBox(height: 140),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
));
|
|
|
|
}
|
...
|
...
|
|