| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431 |
- import 'package:clean/base/base_page.dart';
- import 'package:clean/module/store/store_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';
- class StorePage extends BasePage<StoreController> {
- const StorePage({super.key});
- @override
- bool immersive() {
- return true;
- }
- @override
- bool statusBarDarkFont() => false;
- @override
- Widget buildBody(BuildContext context) {
- return Scaffold(
- backgroundColor: Colors.black,
- body: Stack(
- children: [
- IgnorePointer(
- child: Assets.images.bgStore.image(
- width: 360.w,
- ),
- ),
- SafeArea(
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Row(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- Container(
- margin: EdgeInsets.only(left: 16.w, top: 14.h),
- child: GestureDetector(
- onTap: () {
- Get.back();
- },
- child: Assets.images.iconCommonBack
- .image(width: 28.w, height: 28.w),
- ),
- ),
- Container(
- margin: EdgeInsets.only(right: 16.w, top: 17.h),
- child: GestureDetector(
- onTap: () {
- Get.back();
- },
- child: Text(
- 'Restore',
- style: TextStyle(
- color: Colors.white70,
- fontSize: 14.sp,
- ),
- ),
- ),
- ),
- ],
- ),
- SizedBox(
- height: 30.h,
- ),
- // 标题
- Center(
- child: RichText(
- text: TextSpan(
- children: [
- TextSpan(
- text: 'CLEAN ',
- style: TextStyle(
- color: "#FFDD55".color,
- fontSize: 20.sp,
- fontWeight: FontWeight.bold,
- ),
- ),
- TextSpan(
- text: 'PRO ',
- style: TextStyle(
- color: Colors.white,
- fontSize: 20.sp,
- fontWeight: FontWeight.bold,
- ),
- ),
- TextSpan(
- text: 'FREE ',
- style: TextStyle(
- color: "#FFDD55".color,
- fontSize: 20.sp,
- fontWeight: FontWeight.bold,
- ),
- ),
- TextSpan(
- text: 'UP STORAGE',
- style: TextStyle(
- color: Colors.white,
- fontSize: 20.sp,
- fontWeight: FontWeight.bold,
- ),
- ),
- ],
- ),
- ),
- ),
- SizedBox(
- height: 20.h,
- ),
- Center(
- child: Container(
- width: 328.w,
- height: 203.h,
- decoration: BoxDecoration(
- image: DecorationImage(
- image: Assets.images.bgStoreFunc.provider(),
- fit: BoxFit.fill,
- ),
- ),
- child: Column(
- mainAxisAlignment: MainAxisAlignment.spaceAround,
- children: [
- _buildFeatureItem(
- icon: Assets.images.iconStoreSimilar
- .image(width: 30.w, height: 30.w),
- title: 'One-click Remove Similar Photos',
- ),
- _buildFeatureItem(
- icon: Assets.images.iconStoreAi
- .image(width: 30.w, height: 30.w),
- title: 'Detect Blurry and Junk Photos',
- ),
- _buildFeatureItem(
- icon: Assets.images.iconStoreContacts
- .image(width: 30.w, height: 30.w),
- title: 'Merge Duplicate Contacts',
- ),
- _buildFeatureItem(
- icon: Assets.images.iconStorePremium
- .image(width: 30.w, height: 30.w),
- title: 'Premium Unlimited',
- ),
- ],
- ),
- ),
- ),
- SizedBox(height: 14.h),
- Expanded(
- child: ListView.builder(
- itemCount: 3,
- itemBuilder: (context, index) {
- return _buildSubscriptionOption(
- title: '3-DAY FREE TRIAL',
- price: '\$6.99/week',
- perDay: 'only \$0.64/day',
- isSelected: true,
- showTag: true,
- );
- },
- ),
- ),
- Center(
- child: Text(
- 'Auto-renewable.Cancel anytime.',
- style: TextStyle(
- color: Colors.white.withOpacity(0.8),
- fontSize: 12.sp,
- ),
- ),
- ),
- SizedBox(
- height: 5.h,
- ),
- Center(
- child: Container(
- width: 312.w,
- height: 48.h,
- decoration: BoxDecoration(
- color: "#0279FB".color,
- borderRadius: BorderRadius.all(
- Radius.circular(24.r),
- ),
- ),
- child: GestureDetector(
- child: Center(
- child: Text(
- "CONTINUE",
- style: TextStyle(
- color: Colors.white,
- fontWeight: FontWeight.w700,
- fontSize: 16.sp,
- ),
- ),
- ),
- ),
- ),
- ),
- // // 底部链接
- SizedBox(height: 8.h,),
- Row(
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- GestureDetector(
- child: Text(
- 'Privacy Policy',
- style: TextStyle(
- color: Colors.white.withOpacity(0.8),
- fontSize: 12.sp,
- ),
- ),
- onTap: () {},
- ),
- Text(
- ' | ',
- style: TextStyle(
- color: Colors.white.withOpacity(0.8),
- fontSize: 12.sp,
- ),
- ),
- GestureDetector(
- child: Text(
- 'User Agreement',
- style: TextStyle(
- color: Colors.white.withOpacity(0.8),
- fontSize: 12.sp,
- ),
- ),
- onTap: () {},
- ),
- ],
- ),
- //
- // // 订阅选项
- // _buildSubscriptionOption(
- // title: '3-DAY FREE TRIAL',
- // price: '\$6.99/week',
- // perDay: 'only \$0.64/day',
- // isSelected: true,
- // showTag: true,
- // ),
- //
- // _buildSubscriptionOption(
- // title: '1 Month',
- // price: '\$19.99',
- // perDay: 'only \$0.64/day',
- // ),
- //
- // _buildSubscriptionOption(
- // title: '1 Year',
- // price: '\$69.99',
- // perDay: 'only \$0.19/day',
- // ),
- //
- // // 底部文本
- // Padding(
- // padding: EdgeInsets.symmetric(vertical: 16.h),
- // child: Center(
- // child: Text(
- // 'Auto-renewable.Cancel anytime.',
- // style: TextStyle(
- // color: Colors.white54,
- // fontSize: 12.sp,
- // ),
- // ),
- // ),
- // ),
- //
- // // 继续按钮
- // Padding(
- // padding: EdgeInsets.all(20.w),
- // child: ElevatedButton(
- // style: ElevatedButton.styleFrom(
- // backgroundColor: Colors.blue,
- // minimumSize: Size(double.infinity, 50.h),
- // shape: RoundedRectangleBorder(
- // borderRadius: BorderRadius.circular(25.r),
- // ),
- // ),
- // child: Text(
- // 'CONTINUE',
- // style: TextStyle(
- // fontSize: 16.sp,
- // fontWeight: FontWeight.bold,
- // ),
- // ),
- // onPressed: () {},
- // ),
- // ),
- //
- // // 底部链接
- // Padding(
- // padding: EdgeInsets.symmetric(horizontal: 20.w),
- // child: Row(
- // mainAxisAlignment: MainAxisAlignment.center,
- // children: [
- // TextButton(
- // child: Text(
- // 'Privacy Policy',
- // style: TextStyle(color: Colors.white54),
- // ),
- // onPressed: () {},
- // ),
- // Text(
- // ' | ',
- // style: TextStyle(color: Colors.white54),
- // ),
- // TextButton(
- // child: Text(
- // 'User Agreement',
- // style: TextStyle(color: Colors.white54),
- // ),
- // onPressed: () {},
- // ),
- // ],
- // ),
- // ),
- ],
- ),
- ),
- ],
- ),
- );
- }
- Widget _buildFeatureItem({
- required Image icon,
- required String title,
- }) {
- return Row(
- children: [
- SizedBox(width: 15.w),
- icon,
- SizedBox(width: 8.w),
- Text(
- title,
- style: TextStyle(
- color: Colors.white,
- fontSize: 15.sp,
- fontWeight: FontWeight.w500,
- ),
- ),
- ],
- );
- }
- Widget _buildSubscriptionOption({
- required String title,
- required String price,
- required String perDay,
- bool isSelected = false,
- bool showTag = false,
- }) {
- return Container(
- margin: EdgeInsets.symmetric(horizontal: 20.w, vertical: 5.h),
- decoration: BoxDecoration(
- color: Colors.white.withOpacity(0.06),
- borderRadius: BorderRadius.circular(14.r),
- border: isSelected ? Border.all(color: Colors.blue, width: 2.w) : null,
- ),
- child: Stack(
- children: [
- Padding(
- padding: EdgeInsets.all(16.w),
- child: Row(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: [
- Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Text(
- title,
- style: TextStyle(
- color: Colors.white,
- fontSize: 16.sp,
- fontWeight: FontWeight.bold,
- ),
- ),
- Text(
- perDay,
- style: TextStyle(
- color: Colors.white54,
- fontSize: 12.sp,
- ),
- ),
- ],
- ),
- Text(
- price,
- style: TextStyle(
- color: Colors.white,
- fontSize: 18.sp,
- fontWeight: FontWeight.bold,
- ),
- ),
- ],
- ),
- ),
- if (showTag)
- Positioned(
- right: 0,
- top: 0,
- child: Container(
- padding: EdgeInsets.symmetric(
- horizontal: 8.w,
- vertical: 4.h,
- ),
- decoration: BoxDecoration(
- color: Colors.red,
- borderRadius: BorderRadius.only(
- topRight: Radius.circular(12.r),
- bottomLeft: Radius.circular(12.r),
- ),
- ),
- child: Text(
- 'No payment now!',
- style: TextStyle(
- color: Colors.white,
- fontSize: 12.sp,
- ),
- ),
- ),
- ),
- ],
- ),
- );
- }
- }
|