Explorar o código

[feat]完成更多页开发

Destiny hai 1 ano
pai
achega
e487b54f24

BIN=BIN
assets/images/icon_more_analysis.webp


BIN=BIN
assets/images/icon_more_analysis_bg.webp


BIN=BIN
assets/images/icon_more_back.webp


BIN=BIN
assets/images/icon_more_privacy.webp


BIN=BIN
assets/images/icon_more_privacy_bg.webp


BIN=BIN
assets/images/icon_more_settings.webp


BIN=BIN
assets/images/icon_more_settings_bg.webp


BIN=BIN
assets/images/icon_more_store_card.webp


BIN=BIN
assets/images/icon_more_wallpaper.webp


BIN=BIN
assets/images/icon_more_wallpaper_bg.webp


+ 2 - 1
lib/base/base_view.dart

@@ -1,3 +1,4 @@
+import 'package:clean/utils/expand.dart';
 import 'package:flutter/material.dart';
 import 'package:get/get.dart';
 
@@ -27,7 +28,7 @@ abstract class BaseView<T extends GetxController> extends GetView<T> {
   void backgroundOnTapEvent() {}
 
   Color backgroundColor() {
-    return Colors.white;
+    return "#05050D".color;
   }
 
   double? viewHeight() {

+ 1 - 1
lib/module/home/home_view.dart

@@ -18,7 +18,7 @@ class HomePage extends BaseView<HomeController> {
   Widget buildBody(BuildContext context) {
     // TODO: implement buildBody
     return Container(
-      color: Colors.white,
+      color: Colors.black,
     );
   }
 }

+ 17 - 22
lib/module/main/main_view.dart

@@ -45,28 +45,23 @@ class MainTabPage extends BasePage<MainController> {
   Widget buildBottomAppBar() {
     return StyleProvider(
       style: BottomTabBarStyle(),
-      child: Container(
-        decoration: BoxDecoration(
-          borderRadius: BorderRadius.all(Radius.circular(12))
-        ),
-        child: ConvexAppBar(
-          height: 65.h,
-          backgroundColor: "#0F0F16".color,
-          activeColor: Colors.transparent,
-          items: [
-            TabItem(
-                icon: Assets.images.iconTabHomeUnselect.image(),
-                activeIcon: Assets.images.iconTabHomeSelected.image()),
-            TabItem(
-                icon: Assets.images.iconTabMoreUnselect.image(),
-                activeIcon: Assets.images.iconTabMoreSelected.image()),
-          ],
-          onTap: (int i) {
-            if (controller.currentIndex != i) {
-              controller.changeIndex(i);
-            }
-          },
-        ),
+      child: ConvexAppBar(
+        height: 65.h,
+        backgroundColor: "#0F0F16".color,
+        activeColor: Colors.transparent,
+        items: [
+          TabItem(
+              icon: Assets.images.iconTabHomeUnselect.image(),
+              activeIcon: Assets.images.iconTabHomeSelected.image()),
+          TabItem(
+              icon: Assets.images.iconTabMoreUnselect.image(),
+              activeIcon: Assets.images.iconTabMoreSelected.image()),
+        ],
+        onTap: (int i) {
+          if (controller.currentIndex != i) {
+            controller.changeIndex(i);
+          }
+        },
       ),
     );
   }

+ 165 - 10
lib/module/more/more_view.dart

@@ -1,21 +1,176 @@
-import 'dart:ui';
-
 import 'package:clean/base/base_view.dart';
 import 'package:clean/module/more/more_controller.dart';
+import 'package:clean/utils/expand.dart';
 import 'package:flutter/Material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
 
-class MorePage extends BaseView<MoreController> {
+import '../../resource/assets.gen.dart';
 
+class MorePage extends BaseView<MoreController> {
   const MorePage({super.key});
 
   @override
-  Color backgroundColor() {
-    return Colors.white;
+  Widget buildBody(BuildContext context) {
+    return SafeArea(
+      child: Container(
+        width: double.infinity,
+        color: "#05050D".color,
+        padding: EdgeInsets.symmetric(horizontal: 16.w),
+        child: Column(
+          mainAxisAlignment: MainAxisAlignment.start,
+          crossAxisAlignment: CrossAxisAlignment.start,
+          children: [
+            Container(
+              margin: EdgeInsets.only(left: 2.w),
+              child: Text(
+                "CleanPro",
+                style: TextStyle(
+                  color: Colors.white,
+                  fontWeight: FontWeight.w900,
+                  fontSize: 24.sp,
+                ),
+              ),
+            ),
+            Expanded(child:
+            SingleChildScrollView(
+              child: Column(
+                mainAxisAlignment: MainAxisAlignment.start,
+                crossAxisAlignment: CrossAxisAlignment.start,
+                children: [
+                  SizedBox(height: 21.h),
+                  _buildStoreCard(),
+                  SizedBox(height: 30.h),
+                  Container(
+                    margin: EdgeInsets.only(left: 2.w),
+                    child: Text(
+                      "More features",
+                      style: TextStyle(
+                        color: Colors.white,
+                        fontWeight: FontWeight.w700,
+                        fontSize: 18.sp,
+                      ),
+                    ),
+                  ),
+                  SizedBox(height: 18.h),
+                  _buildCustomCard(
+                    "Privacy Space",
+                    Assets.images.iconMorePrivacyBg.image(),
+                    Assets.images.iconMorePrivacy
+                        .image(height: 72.w, width: 72.w),
+                    onTap: () {
+
+                    }
+                  ),
+                  SizedBox(height: 14.h),
+                  _buildCustomCard(
+                    "Photo Analysis",
+                    Assets.images.iconMoreAnalysisBg.image(),
+                    Assets.images.iconMoreAnalysis
+                        .image(height: 72.w, width: 72.w),
+                      onTap: () {
+
+                      }
+                  ),
+                  SizedBox(height: 14.h),
+                  _buildCustomCard(
+                    "Wallpaper",
+                    Assets.images.iconMoreWallpaperBg.image(),
+                    Assets.images.iconMoreWallpaper
+                        .image(height: 72.w, width: 72.w),
+                      onTap: () {
+
+                      }
+                  ),
+                  SizedBox(height: 14.h),
+                  _buildCustomCard(
+                    "Settings",
+                    Assets.images.iconMoreSettingsBg.image(),
+                    Assets.images.iconMoreSettings
+                        .image(height: 72.w, width: 72.w),
+                      onTap: () {
+
+                      }
+                  ),
+                  SizedBox(height: 25.h),
+                ],
+              ),
+            ),),
+          ],
+        ),
+      ),
+    );
   }
 
-  @override
-  Widget buildBody(BuildContext context) {
-    // TODO: implement buildBody
-    throw UnimplementedError();
+  Widget _buildStoreCard() {
+    return Stack(
+      children: [
+        Assets.images.iconMoreStoreCard.image(),
+        Positioned(
+          left: 12.w,
+          bottom: 15.h,
+          child: Container(
+            width: 107.w,
+            height: 30.h,
+            decoration: BoxDecoration(
+              border: Border.all(
+                color: '#FFFFFF'.color.withOpacity(0.18),
+                width: 1,
+              ),
+              borderRadius: BorderRadius.all(
+                Radius.circular(15.h),
+              ),
+            ),
+            child: Row(
+              mainAxisAlignment: MainAxisAlignment.spaceEvenly,
+              children: [
+                Text(
+                  "Get more",
+                  style: TextStyle(
+                    color: Colors.white,
+                    fontWeight: FontWeight.w500,
+                    fontSize: 14.sp,
+                  ),
+                ),
+                Icon(
+                  Icons.arrow_forward_ios,
+                  size: 10.w,
+                  color: Colors.white,
+                ),
+              ],
+            ),
+          ),
+        ),
+      ],
+    );
+  }
+
+  Widget _buildCustomCard(String title, Image bg, Image icon, {required Function() onTap}) {
+    return Stack(
+      children: [
+        bg,
+        Positioned(
+          top: 12.h,
+          left: 22.w,
+          child: Text(
+            title,
+            style: TextStyle(
+              color: Colors.white,
+              fontWeight: FontWeight.w500,
+              fontSize: 20.sp,
+            ),
+          ),
+        ),
+        Positioned(
+          bottom: 12.h,
+          left: 22.w,
+          child: Assets.images.iconMoreBack.image(height: 28.w, width: 28.w),
+        ),
+        Positioned(
+          right: 23.w,
+          top: 12.h,
+          child: icon,
+        ),
+      ],
+    );
   }
-}
+}