more_view.dart 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  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. controller.privacySpaceClick();
  59. }),
  60. SizedBox(height: 14.h),
  61. _buildCustomCard(
  62. "Contacts",
  63. Assets.images.iconMoreContactsBg.image(),
  64. Assets.images.iconMoreContacts
  65. .image(height: 72.w, width: 72.w),
  66. onTap: () {
  67. controller.contactClick();
  68. },
  69. ),
  70. SizedBox(height: 14.h),
  71. _buildCustomCard(
  72. "Photo Analysis",
  73. Assets.images.iconMoreAnalysisBg.image(),
  74. Assets.images.iconMoreAnalysis
  75. .image(height: 72.w, width: 72.w),
  76. onTap: () {
  77. controller.photoAnalysisClick();
  78. },
  79. ),
  80. SizedBox(height: 14.h),
  81. _buildCustomCard(
  82. "Wallpaper",
  83. Assets.images.iconMoreWallpaperBg.image(),
  84. Assets.images.iconMoreWallpaper
  85. .image(height: 72.w, width: 72.w), onTap: () {
  86. controller.walletClick();
  87. }),
  88. SizedBox(height: 14.h),
  89. _buildCustomCard(
  90. "Settings",
  91. Assets.images.iconMoreSettingsBg.image(),
  92. Assets.images.iconMoreSettings
  93. .image(height: 72.w, width: 72.w),
  94. onTap: () {
  95. controller.settingClick();
  96. },
  97. ),
  98. SizedBox(height: 25.h),
  99. ],
  100. ),
  101. ),
  102. ),
  103. ],
  104. ),
  105. ),
  106. );
  107. }
  108. Widget _buildStoreCard() {
  109. return GestureDetector(
  110. onTap: controller.storeCardClick,
  111. child: Stack(
  112. children: [
  113. Assets.images.iconMoreStoreCard.image(),
  114. Positioned(
  115. left: 12.w,
  116. bottom: 15.h,
  117. child: Container(
  118. width: 107.w,
  119. height: 30.h,
  120. decoration: BoxDecoration(
  121. border: Border.all(
  122. color: '#FFFFFF'.color.withOpacity(0.18),
  123. width: 1,
  124. ),
  125. borderRadius: BorderRadius.all(
  126. Radius.circular(15.h),
  127. ),
  128. ),
  129. child: Row(
  130. mainAxisAlignment: MainAxisAlignment.spaceEvenly,
  131. children: [
  132. Text(
  133. "Get more",
  134. style: TextStyle(
  135. color: Colors.white,
  136. fontWeight: FontWeight.w500,
  137. fontSize: 14.sp,
  138. ),
  139. ),
  140. Icon(
  141. Icons.arrow_forward_ios,
  142. size: 10.w,
  143. color: Colors.white,
  144. ),
  145. ],
  146. ),
  147. ),
  148. ),
  149. ],
  150. ),
  151. );
  152. }
  153. Widget _buildCustomCard(String title, Image bg, Image icon,
  154. {required Function() onTap}) {
  155. return GestureDetector(
  156. onTap: onTap,
  157. child: Stack(
  158. children: [
  159. bg,
  160. Positioned(
  161. top: 12.h,
  162. left: 22.w,
  163. child: Text(
  164. title,
  165. style: TextStyle(
  166. color: Colors.white,
  167. fontWeight: FontWeight.w500,
  168. fontSize: 20.sp,
  169. ),
  170. ),
  171. ),
  172. Positioned(
  173. bottom: 12.h,
  174. left: 22.w,
  175. child: Assets.images.iconMoreBack.image(height: 28.w, width: 28.w),
  176. ),
  177. Positioned(
  178. right: 23.w,
  179. top: 12.h,
  180. child: icon,
  181. ),
  182. ],
  183. ),
  184. );
  185. }
  186. }