more_view.dart 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. import 'package:clean/base/base_view.dart';
  2. import 'package:clean/module/more/more_controller.dart';
  3. import 'package:clean/module/wallpaper/wallpaper_view.dart';
  4. import 'package:clean/router/app_pages.dart';
  5. import 'package:clean/utils/expand.dart';
  6. import 'package:flutter/Material.dart';
  7. import 'package:flutter_screenutil/flutter_screenutil.dart';
  8. import 'package:get/get.dart';
  9. import 'package:get/get_core/src/get_main.dart';
  10. import '../../resource/assets.gen.dart';
  11. class MorePage extends BaseView<MoreController> {
  12. const MorePage({super.key});
  13. @override
  14. Widget buildBody(BuildContext context) {
  15. return SafeArea(
  16. child: Container(
  17. width: double.infinity,
  18. color: "#05050D".color,
  19. padding: EdgeInsets.symmetric(horizontal: 16.w),
  20. child: Column(
  21. mainAxisAlignment: MainAxisAlignment.start,
  22. crossAxisAlignment: CrossAxisAlignment.start,
  23. children: [
  24. Text(
  25. "CleanPro",
  26. style: TextStyle(
  27. color: Colors.white,
  28. fontWeight: FontWeight.w900,
  29. fontSize: 24.sp,
  30. ),
  31. ),
  32. Expanded(
  33. child: SingleChildScrollView(
  34. child: Column(
  35. mainAxisAlignment: MainAxisAlignment.start,
  36. crossAxisAlignment: CrossAxisAlignment.start,
  37. children: [
  38. SizedBox(height: 21.h),
  39. _buildStoreCard(),
  40. SizedBox(height: 30.h),
  41. Container(
  42. margin: EdgeInsets.only(left: 2.w),
  43. child: Text(
  44. "More features",
  45. style: TextStyle(
  46. color: Colors.white,
  47. fontWeight: FontWeight.w700,
  48. fontSize: 18.sp,
  49. ),
  50. ),
  51. ),
  52. SizedBox(height: 18.h),
  53. _buildCustomCard(
  54. "Privacy Space",
  55. Assets.images.iconMorePrivacyBg.image(),
  56. Assets.images.iconMorePrivacy
  57. .image(height: 72.w, width: 72.w), onTap: () {
  58. Get.toNamed(RoutePath.privacy);
  59. }),
  60. SizedBox(height: 14.h),
  61. _buildCustomCard(
  62. "Photo Analysis",
  63. Assets.images.iconMoreAnalysisBg.image(),
  64. Assets.images.iconMoreAnalysis
  65. .image(height: 72.w, width: 72.w),
  66. onTap: () {
  67. Get.toNamed(RoutePath.analysis);
  68. },
  69. ),
  70. SizedBox(height: 14.h),
  71. _buildCustomCard(
  72. "Wallpaper",
  73. Assets.images.iconMoreWallpaperBg.image(),
  74. Assets.images.iconMoreWallpaper
  75. .image(height: 72.w, width: 72.w),
  76. onTap: () {
  77. WallPaperPage.start();
  78. }),
  79. SizedBox(height: 14.h),
  80. _buildCustomCard(
  81. "Settings",
  82. Assets.images.iconMoreSettingsBg.image(),
  83. Assets.images.iconMoreSettings
  84. .image(height: 72.w, width: 72.w),
  85. onTap: () {
  86. Get.toNamed(RoutePath.setting);
  87. },
  88. ),
  89. SizedBox(height: 25.h),
  90. ],
  91. ),
  92. ),
  93. ),
  94. ],
  95. ),
  96. ),
  97. );
  98. }
  99. Widget _buildStoreCard() {
  100. return GestureDetector(
  101. onTap: () {
  102. Get.toNamed(RoutePath.store);
  103. },
  104. child: Stack(
  105. children: [
  106. Assets.images.iconMoreStoreCard.image(),
  107. Positioned(
  108. left: 12.w,
  109. bottom: 15.h,
  110. child: Container(
  111. width: 107.w,
  112. height: 30.h,
  113. decoration: BoxDecoration(
  114. border: Border.all(
  115. color: '#FFFFFF'.color.withOpacity(0.18),
  116. width: 1,
  117. ),
  118. borderRadius: BorderRadius.all(
  119. Radius.circular(15.h),
  120. ),
  121. ),
  122. child: Row(
  123. mainAxisAlignment: MainAxisAlignment.spaceEvenly,
  124. children: [
  125. Text(
  126. "Get more",
  127. style: TextStyle(
  128. color: Colors.white,
  129. fontWeight: FontWeight.w500,
  130. fontSize: 14.sp,
  131. ),
  132. ),
  133. Icon(
  134. Icons.arrow_forward_ios,
  135. size: 10.w,
  136. color: Colors.white,
  137. ),
  138. ],
  139. ),
  140. ),
  141. ),
  142. ],
  143. ),
  144. );
  145. }
  146. Widget _buildCustomCard(String title, Image bg, Image icon,
  147. {required Function() onTap}) {
  148. return GestureDetector(
  149. onTap: onTap,
  150. child: Stack(
  151. children: [
  152. bg,
  153. Positioned(
  154. top: 12.h,
  155. left: 22.w,
  156. child: Text(
  157. title,
  158. style: TextStyle(
  159. color: Colors.white,
  160. fontWeight: FontWeight.w500,
  161. fontSize: 20.sp,
  162. ),
  163. ),
  164. ),
  165. Positioned(
  166. bottom: 12.h,
  167. left: 22.w,
  168. child: Assets.images.iconMoreBack.image(height: 28.w, width: 28.w),
  169. ),
  170. Positioned(
  171. right: 23.w,
  172. top: 12.h,
  173. child: icon,
  174. ),
  175. ],
  176. ),
  177. );
  178. }
  179. }