| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192 |
- import 'package:clean/base/base_view.dart';
- import 'package:clean/module/more/more_controller.dart';
- import 'package:clean/module/wallpaper/wallpaper_view.dart';
- import 'package:clean/router/app_pages.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 'package:get/get_core/src/get_main.dart';
- import '../../resource/assets.gen.dart';
- class MorePage extends BaseView<MoreController> {
- const MorePage({super.key});
- @override
- Widget buildBody(BuildContext context) {
- return SafeArea(
- child: Container(
- width: double.infinity,
- color: "#05050D".color,
- padding: EdgeInsets.symmetric(horizontal: 16.w),
- child: Column(
- mainAxisAlignment: MainAxisAlignment.start,
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Text(
- "CleanPro",
- style: TextStyle(
- color: Colors.white,
- fontWeight: FontWeight.w900,
- fontSize: 24.sp,
- ),
- ),
- Expanded(
- child: SingleChildScrollView(
- child: Column(
- mainAxisAlignment: MainAxisAlignment.start,
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- SizedBox(height: 21.h),
- _buildStoreCard(),
- SizedBox(height: 30.h),
- Container(
- margin: EdgeInsets.only(left: 2.w),
- child: Text(
- "More features",
- style: TextStyle(
- color: Colors.white,
- fontWeight: FontWeight.w700,
- fontSize: 18.sp,
- ),
- ),
- ),
- SizedBox(height: 18.h),
- _buildCustomCard(
- "Privacy Space",
- Assets.images.iconMorePrivacyBg.image(),
- Assets.images.iconMorePrivacy
- .image(height: 72.w, width: 72.w), onTap: () {
- controller.privacySpaceClick();
- }),
- SizedBox(height: 14.h),
- _buildCustomCard(
- "Contacts",
- Assets.images.iconMoreContactsBg.image(),
- Assets.images.iconMoreContacts
- .image(height: 72.w, width: 72.w),
- onTap: () {
- controller.contactClick();
- },
- ),
- SizedBox(height: 14.h),
- _buildCustomCard(
- "Photo Analysis",
- Assets.images.iconMoreAnalysisBg.image(),
- Assets.images.iconMoreAnalysis
- .image(height: 72.w, width: 72.w),
- onTap: () {
- controller.photoAnalysisClick();
- },
- ),
- SizedBox(height: 14.h),
- _buildCustomCard(
- "Wallpaper",
- Assets.images.iconMoreWallpaperBg.image(),
- Assets.images.iconMoreWallpaper
- .image(height: 72.w, width: 72.w), onTap: () {
- controller.walletClick();
- }),
- SizedBox(height: 14.h),
- _buildCustomCard(
- "Settings",
- Assets.images.iconMoreSettingsBg.image(),
- Assets.images.iconMoreSettings
- .image(height: 72.w, width: 72.w),
- onTap: () {
- controller.settingClick();
- },
- ),
- SizedBox(height: 25.h),
- ],
- ),
- ),
- ),
- ],
- ),
- ),
- );
- }
- Widget _buildStoreCard() {
- return GestureDetector(
- onTap: controller.storeCardClick,
- child: Stack(
- children: [
- Assets.images.iconMoreStoreCard.image(),
- Positioned(
- left: 12.w,
- bottom: 15.h,
- child: Container(
- width: 107.w,
- height: 30.h,
- decoration: BoxDecoration(
- border: Border.all(
- color: '#FFFFFF'.color.withOpacity(0.18),
- width: 1,
- ),
- borderRadius: BorderRadius.all(
- Radius.circular(15.h),
- ),
- ),
- child: Row(
- mainAxisAlignment: MainAxisAlignment.spaceEvenly,
- children: [
- Text(
- "Get more",
- style: TextStyle(
- color: Colors.white,
- fontWeight: FontWeight.w500,
- fontSize: 14.sp,
- ),
- ),
- Icon(
- Icons.arrow_forward_ios,
- size: 10.w,
- color: Colors.white,
- ),
- ],
- ),
- ),
- ),
- ],
- ),
- );
- }
- Widget _buildCustomCard(String title, Image bg, Image icon,
- {required Function() onTap}) {
- return GestureDetector(
- onTap: onTap,
- child: Stack(
- children: [
- bg,
- Positioned(
- top: 12.h,
- left: 22.w,
- child: Text(
- title,
- style: TextStyle(
- color: Colors.white,
- fontWeight: FontWeight.w500,
- fontSize: 20.sp,
- ),
- ),
- ),
- Positioned(
- bottom: 12.h,
- left: 22.w,
- child: Assets.images.iconMoreBack.image(height: 28.w, width: 28.w),
- ),
- Positioned(
- right: 23.w,
- top: 12.h,
- child: icon,
- ),
- ],
- ),
- );
- }
- }
|