Ver código fonte

[modify]更改颜色

zk 1 ano atrás
pai
commit
4ffd2f58fd

BIN
assets/images/icon_home_talk_arrow.webp


+ 2 - 0
assets/string/base/string.xml

@@ -4,4 +4,6 @@
     <string name="main_tab_home">首页</string>
     <string name="main_tab_file">文件</string>
     <string name="home_go_login">立即登录</string>
+    <string name="home_talk_record">谈话记录</string>
+    <string name="home_talk_see_all">查看全部</string>
 </resources>

+ 40 - 5
lib/module/home/view.dart

@@ -30,10 +30,44 @@ class HomePage extends BasePage<HomePageController> {
                   child: CustomScrollView(
                 slivers: [
                   SliverToBoxAdapter(
-                    child: Container(
-                      padding: EdgeInsets.all(16),
-                      color: Colors.blue,
-                      child: Text('头部', style: TextStyle(color: Colors.white)),
+                    child: Column(
+                      children: [
+                        SizedBox(height: 7.h),
+                        Padding(
+                          padding: const EdgeInsets.symmetric(horizontal: 12).w,
+                          child: Row(
+                            crossAxisAlignment: CrossAxisAlignment.center,
+                            children: [
+                              Text(StringName.homeTalkRecord.tr,
+                                  style: TextStyle(
+                                      fontWeight: FontWeight.bold,
+                                      fontSize: 17.sp,
+                                      color: ColorName.primaryTextColor)),
+                              const Spacer(),
+                              GestureDetector(
+                                onTap: () {},
+                                child: Row(
+                                  crossAxisAlignment: CrossAxisAlignment.center,
+                                  children: [
+                                    Text(
+                                      StringName.homeTalkSeeAll.tr,
+                                      style: TextStyle(
+                                          fontSize: 13.sp,
+                                          color: ColorName.secondaryTextColor),
+                                    ),
+                                    SizedBox(
+                                        width: 16.w,
+                                        height: 16.w,
+                                        child: Assets.images.iconHomeTalkArrow
+                                            .image()),
+                                  ],
+                                ),
+                              )
+                            ],
+                          ),
+                        ),
+                        SizedBox(height: 12.h),
+                      ],
                     ),
                   ),
                   SliverList(
@@ -77,7 +111,7 @@ class HomePage extends BasePage<HomePageController> {
                 style: TextStyle(
                     fontWeight: FontWeight.bold,
                     fontSize: 15.sp,
-                    color: ColorName.commonTxtColor))
+                    color: ColorName.primaryTextColor))
           ],
         ),
       ),
@@ -92,6 +126,7 @@ class HomePage extends BasePage<HomePageController> {
                 padding:
                     const EdgeInsets.symmetric(horizontal: 8, vertical: 2).w,
                 child: Row(
+                  crossAxisAlignment: CrossAxisAlignment.center,
                   children: [
                     SizedBox(
                         width: 28.w,