more_view.dart 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  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. Container(
  24. child: Text(
  25. "CleanPro",
  26. style: TextStyle(
  27. color: Colors.white,
  28. fontWeight: FontWeight.w900,
  29. fontSize: 24.sp,
  30. ),
  31. ),
  32. ),
  33. Expanded(child:
  34. SingleChildScrollView(
  35. child: Column(
  36. mainAxisAlignment: MainAxisAlignment.start,
  37. crossAxisAlignment: CrossAxisAlignment.start,
  38. children: [
  39. SizedBox(height: 21.h),
  40. _buildStoreCard(),
  41. SizedBox(height: 30.h),
  42. Container(
  43. margin: EdgeInsets.only(left: 2.w),
  44. child: Text(
  45. "More features",
  46. style: TextStyle(
  47. color: Colors.white,
  48. fontWeight: FontWeight.w700,
  49. fontSize: 18.sp,
  50. ),
  51. ),
  52. ),
  53. SizedBox(height: 18.h),
  54. _buildCustomCard(
  55. "Privacy Space",
  56. Assets.images.iconMorePrivacyBg.image(),
  57. Assets.images.iconMorePrivacy
  58. .image(height: 72.w, width: 72.w),
  59. onTap: () {
  60. Get.toNamed(RoutePath.privacy);
  61. }
  62. ),
  63. SizedBox(height: 14.h),
  64. _buildCustomCard(
  65. "Photo Analysis",
  66. Assets.images.iconMoreAnalysisBg.image(),
  67. Assets.images.iconMoreAnalysis
  68. .image(height: 72.w, width: 72.w),
  69. onTap: () {
  70. }
  71. ),
  72. SizedBox(height: 14.h),
  73. _buildCustomCard(
  74. "Wallpaper",
  75. Assets.images.iconMoreWallpaperBg.image(),
  76. Assets.images.iconMoreWallpaper
  77. .image(height: 72.w, width: 72.w),
  78. onTap: () {
  79. }
  80. ),
  81. SizedBox(height: 14.h),
  82. _buildCustomCard(
  83. "Settings",
  84. Assets.images.iconMoreSettingsBg.image(),
  85. Assets.images.iconMoreSettings
  86. .image(height: 72.w, width: 72.w),
  87. onTap: () {
  88. }
  89. ),
  90. SizedBox(height: 25.h),
  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, {required Function() onTap}) {
  147. return GestureDetector(
  148. onTap: onTap,
  149. child: Stack(
  150. children: [
  151. bg,
  152. Positioned(
  153. top: 12.h,
  154. left: 22.w,
  155. child: Text(
  156. title,
  157. style: TextStyle(
  158. color: Colors.white,
  159. fontWeight: FontWeight.w500,
  160. fontSize: 20.sp,
  161. ),
  162. ),
  163. ),
  164. Positioned(
  165. bottom: 12.h,
  166. left: 22.w,
  167. child: Assets.images.iconMoreBack.image(height: 28.w, width: 28.w),
  168. ),
  169. Positioned(
  170. right: 23.w,
  171. top: 12.h,
  172. child: icon,
  173. ),
  174. ],
  175. ),
  176. );
  177. }
  178. }