more_view.dart 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  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. _buildCustomCard(
  91. "Contacts",
  92. Assets.images.iconMoreSettingsBg.image(),
  93. Assets.images.iconMoreSettings
  94. .image(height: 72.w, width: 72.w),
  95. onTap: () {
  96. Get.toNamed(RoutePath.contact);
  97. },
  98. ),
  99. SizedBox(height: 25.h),
  100. ],
  101. ),
  102. ),
  103. ),
  104. ],
  105. ),
  106. ),
  107. );
  108. }
  109. Widget _buildStoreCard() {
  110. return GestureDetector(
  111. onTap: () {
  112. Get.toNamed(RoutePath.store);
  113. },
  114. child: Stack(
  115. children: [
  116. Assets.images.iconMoreStoreCard.image(),
  117. Positioned(
  118. left: 12.w,
  119. bottom: 15.h,
  120. child: Container(
  121. width: 107.w,
  122. height: 30.h,
  123. decoration: BoxDecoration(
  124. border: Border.all(
  125. color: '#FFFFFF'.color.withOpacity(0.18),
  126. width: 1,
  127. ),
  128. borderRadius: BorderRadius.all(
  129. Radius.circular(15.h),
  130. ),
  131. ),
  132. child: Row(
  133. mainAxisAlignment: MainAxisAlignment.spaceEvenly,
  134. children: [
  135. Text(
  136. "Get more",
  137. style: TextStyle(
  138. color: Colors.white,
  139. fontWeight: FontWeight.w500,
  140. fontSize: 14.sp,
  141. ),
  142. ),
  143. Icon(
  144. Icons.arrow_forward_ios,
  145. size: 10.w,
  146. color: Colors.white,
  147. ),
  148. ],
  149. ),
  150. ),
  151. ),
  152. ],
  153. ),
  154. );
  155. }
  156. Widget _buildCustomCard(String title, Image bg, Image icon,
  157. {required Function() onTap}) {
  158. return GestureDetector(
  159. onTap: onTap,
  160. child: Stack(
  161. children: [
  162. bg,
  163. Positioned(
  164. top: 12.h,
  165. left: 22.w,
  166. child: Text(
  167. title,
  168. style: TextStyle(
  169. color: Colors.white,
  170. fontWeight: FontWeight.w500,
  171. fontSize: 20.sp,
  172. ),
  173. ),
  174. ),
  175. Positioned(
  176. bottom: 12.h,
  177. left: 22.w,
  178. child: Assets.images.iconMoreBack.image(height: 28.w, width: 28.w),
  179. ),
  180. Positioned(
  181. right: 23.w,
  182. top: 12.h,
  183. child: icon,
  184. ),
  185. ],
  186. ),
  187. );
  188. }
  189. }