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