more_view.dart 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. import 'package:clean/base/base_view.dart';
  2. import 'package:clean/module/more/more_controller.dart';
  3. import 'package:clean/utils/expand.dart';
  4. import 'package:flutter/Material.dart';
  5. import 'package:flutter_screenutil/flutter_screenutil.dart';
  6. import '../../resource/assets.gen.dart';
  7. class MorePage extends BaseView<MoreController> {
  8. const MorePage({super.key});
  9. @override
  10. Widget buildBody(BuildContext context) {
  11. return SafeArea(
  12. child: Container(
  13. width: double.infinity,
  14. color: "#05050D".color,
  15. padding: EdgeInsets.symmetric(horizontal: 16.w),
  16. child: Column(
  17. mainAxisAlignment: MainAxisAlignment.start,
  18. crossAxisAlignment: CrossAxisAlignment.start,
  19. children: [
  20. Container(
  21. margin: EdgeInsets.only(left: 2.w),
  22. child: Text(
  23. "CleanPro",
  24. style: TextStyle(
  25. color: Colors.white,
  26. fontWeight: FontWeight.w900,
  27. fontSize: 24.sp,
  28. ),
  29. ),
  30. ),
  31. Expanded(child:
  32. 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),
  57. onTap: () {
  58. }
  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. }
  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. }
  77. ),
  78. SizedBox(height: 14.h),
  79. _buildCustomCard(
  80. "Settings",
  81. Assets.images.iconMoreSettingsBg.image(),
  82. Assets.images.iconMoreSettings
  83. .image(height: 72.w, width: 72.w),
  84. onTap: () {
  85. }
  86. ),
  87. SizedBox(height: 25.h),
  88. ],
  89. ),
  90. ),),
  91. ],
  92. ),
  93. ),
  94. );
  95. }
  96. Widget _buildStoreCard() {
  97. return Stack(
  98. children: [
  99. Assets.images.iconMoreStoreCard.image(),
  100. Positioned(
  101. left: 12.w,
  102. bottom: 15.h,
  103. child: Container(
  104. width: 107.w,
  105. height: 30.h,
  106. decoration: BoxDecoration(
  107. border: Border.all(
  108. color: '#FFFFFF'.color.withOpacity(0.18),
  109. width: 1,
  110. ),
  111. borderRadius: BorderRadius.all(
  112. Radius.circular(15.h),
  113. ),
  114. ),
  115. child: Row(
  116. mainAxisAlignment: MainAxisAlignment.spaceEvenly,
  117. children: [
  118. Text(
  119. "Get more",
  120. style: TextStyle(
  121. color: Colors.white,
  122. fontWeight: FontWeight.w500,
  123. fontSize: 14.sp,
  124. ),
  125. ),
  126. Icon(
  127. Icons.arrow_forward_ios,
  128. size: 10.w,
  129. color: Colors.white,
  130. ),
  131. ],
  132. ),
  133. ),
  134. ),
  135. ],
  136. );
  137. }
  138. Widget _buildCustomCard(String title, Image bg, Image icon, {required Function() onTap}) {
  139. return Stack(
  140. children: [
  141. bg,
  142. Positioned(
  143. top: 12.h,
  144. left: 22.w,
  145. child: Text(
  146. title,
  147. style: TextStyle(
  148. color: Colors.white,
  149. fontWeight: FontWeight.w500,
  150. fontSize: 20.sp,
  151. ),
  152. ),
  153. ),
  154. Positioned(
  155. bottom: 12.h,
  156. left: 22.w,
  157. child: Assets.images.iconMoreBack.image(height: 28.w, width: 28.w),
  158. ),
  159. Positioned(
  160. right: 23.w,
  161. top: 12.h,
  162. child: icon,
  163. ),
  164. ],
  165. );
  166. }
  167. }