more_view.dart 5.7 KB

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