| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162 |
- import 'dart:async';
- import 'package:clean/base/base_page.dart';
- import 'package:clean/module/store/discount/discount_controller.dart';
- import 'package:clean/utils/expand.dart';
- import 'package:flutter/Material.dart';
- import 'package:flutter_screenutil/flutter_screenutil.dart';
- import 'package:get/get.dart';
- import '../../../resource/assets.gen.dart';
- import 'count_down_timer.dart';
- class DiscountPage extends BasePage<DiscountController> {
- const DiscountPage({super.key});
- @override
- bool immersive() {
- return true;
- }
- @override
- bool statusBarDarkFont() => false;
- @override
- Widget buildBody(BuildContext context) {
- return Scaffold(
- backgroundColor: "#05050D".color,
- body: Stack(
- children: [
- // IgnorePointer(
- // child: Assets.images.bgStore.image(
- // width: 360.w,
- // ),
- // ),
- SafeArea(
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- Row(
- children: [
- Container(
- margin: EdgeInsets.only(left: 16.w, top: 14.h),
- child: GestureDetector(
- onTap: () {
- Get.back();
- },
- child: Assets.images.iconStoreClose
- .image(width: 28.w, height: 28.w),
- ),
- ),
- ],
- ),
- Assets.images.iconDiscountTitle
- .image(width: 259.w, height: 55.h),
- SizedBox(
- height: 20.h,
- ),
- Assets.images.iconDiscountPercent
- .image(width: 195.w, height: 86.h),
- SizedBox(
- height: 13.h,
- ),
- Container(
- width: 197.w,
- height: 32.h,
- padding: EdgeInsets.all(1.w),
- decoration: BoxDecoration(
- gradient: LinearGradient(
- begin: Alignment.topCenter,
- end: Alignment.bottomCenter,
- colors: [
- '#CF9EFD'.color,
- '#4DCFFF'.color.withOpacity(0.5),
- ],
- ),
- borderRadius: BorderRadius.all(Radius.circular(18.r)),
- ),
- child: Container(
- decoration: BoxDecoration(
- color: "#05050D".color,
- borderRadius: BorderRadius.all(Radius.circular(18.r)),
- ),
- child: Center(
- child: Text(
- "Get CleanPro Premium",
- style: TextStyle(
- color: Colors.white,
- fontSize: 15.sp,
- fontWeight: FontWeight.w700,
- ),
- ),
- ),
- ),
- ),
- SizedBox(
- height: 26.h,
- ),
- // 创建一个1分钟的倒计时
- CountdownTimer(duration: const Duration(minutes: 1)),
- Spacer(),
- Text(
- "3-Day Free Trial",
- style: TextStyle(
- color: Colors.white,
- fontSize: 16.sp,
- fontWeight: FontWeight.w500,
- ),
- ),
- Text(
- "Then \$69.99",
- style: TextStyle(
- color: Colors.white,
- fontSize: 13.sp,
- ),
- ),
- SizedBox(
- height: 14.h,
- ),
- GestureDetector(
- onTap: () {
- // controller.onBuyClick();
- },
- child: Container(
- width: 312.w,
- height: 48.h,
- decoration: BoxDecoration(
- color: "#0279FB".color,
- borderRadius: BorderRadius.all(
- Radius.circular(24.r),
- ),
- ),
- child: Center(
- child: Text(
- "START FREE TRIAL",
- style: TextStyle(
- color: Colors.white,
- fontWeight: FontWeight.w700,
- fontSize: 16.sp,
- ),
- ),
- ),
- ),
- ),
- SizedBox(
- height: 5.h,
- ),
- Text(
- "No payment now!",
- style: TextStyle(
- color: "#57C87A".color,
- fontSize: 12.sp,
- fontWeight: FontWeight.w500,
- ),
- ),
- ],
- ),
- ),
- ],
- ),
- );
- }
- }
|