Browse Source

修改字体大小

mq 1 year ago
parent
commit
28ee3dc806

+ 6 - 18
lib/page/home/home_page.dart

@@ -1,6 +1,5 @@
1 1
 import 'package:cached_network_image/cached_network_image.dart';
2 2
 import 'package:card_swiper/card_swiper.dart';
3
-import 'package:flutter/cupertino.dart';
4 3
 import 'package:flutter/material.dart';
5 4
 import 'package:lszlgl/base/base_state.dart';
6 5
 import 'package:lszlgl/page/sample_task/sample_task_list_tab_page.dart';
@@ -54,7 +53,7 @@ class _HomePageState extends BaseState<HomePage> with AutomaticKeepAliveClientMi
54 53
             child: Column(
55 54
               children: [
56 55
                 buildBanner(),
57
-                const SizedBox(height: 24),
56
+                const SizedBox(height: 18),
58 57
                 ...List.generate(
59 58
                   serviceList.length,
60 59
                   (index) => buildServiceItem(serviceList[index]),
@@ -67,17 +66,6 @@ class _HomePageState extends BaseState<HomePage> with AutomaticKeepAliveClientMi
67 66
     );
68 67
   }
69 68
 
70
-  Widget buildTitle() {
71
-    return Container(
72
-      alignment: Alignment.center,
73
-      padding: EdgeInsets.only(top: MediaQuery.of(context).padding.top + 26, bottom: 26),
74
-      child: const Text(
75
-        '质量安全检验监测',
76
-        style: TextStyle(color: Colors.white, fontSize: 22, fontWeight: FontWeight.w500),
77
-      ),
78
-    );
79
-  }
80
-
81 69
   Widget buildBanner() {
82 70
     return Container(
83 71
       margin: const EdgeInsets.symmetric(horizontal: 12),
@@ -104,8 +92,8 @@ class _HomePageState extends BaseState<HomePage> with AutomaticKeepAliveClientMi
104 92
     return GestureDetector(
105 93
       onTap: service.onTap,
106 94
       child: Container(
107
-        margin: const EdgeInsets.only(left: 14, right: 14, bottom: 28),
108
-        padding: const EdgeInsets.symmetric(vertical: 24, horizontal: 48),
95
+        margin: const EdgeInsets.only(left: 12, right: 12, bottom: 22),
96
+        padding: const EdgeInsets.symmetric(vertical: 20, horizontal: 40),
109 97
         clipBehavior: Clip.hardEdge,
110 98
         decoration: BoxDecoration(
111 99
           borderRadius: const BorderRadius.all(Radius.circular(12)),
@@ -114,8 +102,8 @@ class _HomePageState extends BaseState<HomePage> with AutomaticKeepAliveClientMi
114 102
         ),
115 103
         child: Row(
116 104
           children: [
117
-            Image.asset(service.icon, height: 80),
118
-            const SizedBox(width: 16),
105
+            Image.asset(service.icon, height: 64),
106
+            const SizedBox(width: 12),
119 107
             Expanded(
120 108
               child: Column(
121 109
                 mainAxisSize: MainAxisSize.min,
@@ -123,7 +111,7 @@ class _HomePageState extends BaseState<HomePage> with AutomaticKeepAliveClientMi
123 111
                   Text(
124 112
                     service.name,
125 113
                     textAlign: TextAlign.center,
126
-                    style: const TextStyle(color: Color(0xFF333333), fontSize: 27, fontWeight: FontWeight.w500),
114
+                    style: const TextStyle(color: Color(0xFF333333), fontSize: 20, fontWeight: FontWeight.w500),
127 115
                   ),
128 116
                   service.nameEn != null
129 117
                       ? Padding(

+ 33 - 26
lib/page/login/login_page.dart

@@ -108,13 +108,13 @@ class _LoginPageState extends BaseLifecycleState<LoginPage> {
108 108
   Widget buildBody() {
109 109
     return Column(
110 110
       children: [
111
-        const SizedBox(height: 88),
111
+        const SizedBox(height: 56),
112 112
         Container(
113 113
           width: double.infinity,
114
-          padding: const EdgeInsets.symmetric(horizontal: 72),
114
+          padding: const EdgeInsets.symmetric(horizontal: 48),
115 115
           child: Image.asset(imgLoginTitle, fit: BoxFit.fill),
116 116
         ),
117
-        const SizedBox(height: 32),
117
+        const SizedBox(height: 20),
118 118
         loginContainer(),
119 119
       ],
120 120
     );
@@ -134,38 +134,45 @@ class _LoginPageState extends BaseLifecycleState<LoginPage> {
134 134
   }
135 135
 
136 136
   Widget userTitle() {
137
-    return Container(
138
-      height: 48,
139
-      width: 174,
140
-      alignment: Alignment.center,
141
-      decoration: const BoxDecoration(
142
-        color: Colors.white,
143
-        borderRadius: BorderRadius.all(Radius.circular(100)),
144
-        border: Border.fromBorderSide(BorderSide(color: Color(0xFF49AAF2), width: 1)),
145
-        boxShadow: [BoxShadow(color: Color(0x941C90FF), offset: Offset(0, 3))],
146
-      ),
147
-      child: const Text(
148
-        '用户登录',
149
-        style: TextStyle(color: Color(0xFF1187DE), fontSize: 18),
150
-      ),
137
+    return Row(
138
+      children: [
139
+        const Spacer(),
140
+        Expanded(
141
+          child: Container(
142
+            padding: const EdgeInsets.symmetric(vertical: 12),
143
+            alignment: Alignment.center,
144
+            decoration: const BoxDecoration(
145
+              color: Colors.white,
146
+              borderRadius: BorderRadius.all(Radius.circular(100)),
147
+              border: Border.fromBorderSide(BorderSide(color: Color(0xFF49AAF2), width: 1)),
148
+              boxShadow: [BoxShadow(color: Color(0x941C90FF), offset: Offset(0, 2))],
149
+            ),
150
+            child: const Text(
151
+              '用户登录',
152
+              style: TextStyle(color: Color(0xFF1187DE), fontSize: 14),
153
+            ),
154
+          ),
155
+        ),
156
+        const Spacer(),
157
+      ],
151 158
     );
152 159
   }
153 160
 
154 161
   Widget buildInputContent() {
155 162
     return Container(
156
-      margin: const EdgeInsets.only(top: 14, left: 18, right: 18),
157
-      padding: const EdgeInsets.all(10),
163
+      margin: const EdgeInsets.only(top: 18, left: 16, right: 16),
164
+      padding: const EdgeInsets.all(6),
158 165
       decoration: BoxDecoration(
159 166
         color: Colors.white.withOpacity(0.2),
160
-        borderRadius: const BorderRadius.all(Radius.circular(24)),
167
+        borderRadius: const BorderRadius.all(Radius.circular(36)),
161 168
       ),
162 169
       child: Container(
163
-        padding: const EdgeInsets.symmetric(horizontal: 32),
170
+        padding: const EdgeInsets.symmetric(horizontal: 24),
164 171
         alignment: Alignment.center,
165
-        decoration: const BoxDecoration(color: Colors.white, borderRadius: BorderRadius.all(Radius.circular(24))),
172
+        decoration: const BoxDecoration(color: Colors.white, borderRadius: BorderRadius.all(Radius.circular(32))),
166 173
         child: Column(
167 174
           children: [
168
-            const SizedBox(height: 72),
175
+            const SizedBox(height: 56),
169 176
             buildEdit(
170 177
               ctrl: accountCtrl,
171 178
               hint: '请输入登录账号',
@@ -180,9 +187,9 @@ class _LoginPageState extends BaseLifecycleState<LoginPage> {
180 187
               obscure: true,
181 188
               onSubmit: (value) => onLogin(),
182 189
             ),
183
-            const SizedBox(height: 80),
190
+            const SizedBox(height: 64),
184 191
             buildLoginBtn(),
185
-            const SizedBox(height: 56),
192
+            const SizedBox(height: 48),
186 193
           ],
187 194
         ),
188 195
       ),
@@ -204,7 +211,7 @@ class _LoginPageState extends BaseLifecycleState<LoginPage> {
204 211
             ? null
205 212
             : Padding(
206 213
                 padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 12),
207
-                child: Image.asset(icon, height: 22),
214
+                child: Image.asset(icon, height: 18),
208 215
               ),
209 216
         prefixIconConstraints: const BoxConstraints(),
210 217
         border: const OutlineInputBorder(borderRadius: BorderRadius.all(Radius.circular(100))),

+ 3 - 2
lib/page/main_tab_page.dart

@@ -90,6 +90,7 @@ class _MainTabPageState extends State<MainTabPage> {
90 90
 
91 91
   Widget buildNavigation() {
92 92
     return NavigationBar(
93
+      height: 56,
93 94
       selectedIndex: selectedIndex,
94 95
       surfaceTintColor: Colors.white,
95 96
       onDestinationSelected: (index) => refreshTab(index, refreshPage: true),
@@ -103,12 +104,12 @@ class _MainTabPageState extends State<MainTabPage> {
103 104
             children: [
104 105
               Image.asset(
105 106
                 index == selectedIndex ? tabIconSelectList[index] : tabIconList[index],
106
-                height: 23,
107
+                height: 18,
107 108
               ),
108 109
               Text(
109 110
                 tabTextList[index],
110 111
                 style: TextStyle(
111
-                  fontSize: 14,
112
+                  fontSize: 12,
112 113
                   fontWeight: FontWeight.w500,
113 114
                   color: index == selectedIndex ? const Color(0xFF333333) : const Color(0xFF888888),
114 115
                 ),

+ 1 - 0
lib/page/sample_task/reap_sample_task/reap_sample_basic_page.dart

@@ -87,6 +87,7 @@ class _ReapSampleBasicPageState extends BaseState<ReapSampleBasicPage> with Auto
87 87
         contentPadding: EdgeInsets.zero,
88 88
         isDense: true,
89 89
       ),
90
+      style: const TextStyle(fontSize: 14),
90 91
       textInputAction: TextInputAction.next,
91 92
       inputFormatters: [],
92 93
     );

+ 7 - 13
lib/page/sample_task/reap_sample_task/reap_sample_disaster_page.dart

@@ -123,6 +123,7 @@ class _ReapSampleDisasterPageState extends BaseState<ReapSampleDisasterPage> wit
123 123
         contentPadding: EdgeInsets.zero,
124 124
         isDense: true,
125 125
       ),
126
+      style: const TextStyle(fontSize: 14),
126 127
       inputFormatters: [],
127 128
     );
128 129
   }
@@ -130,19 +131,12 @@ class _ReapSampleDisasterPageState extends BaseState<ReapSampleDisasterPage> wit
130 131
   Widget buildSwitch(ValueNotifier<bool> notifier) {
131 132
     return ValueListenableBuilder<bool>(
132 133
       valueListenable: notifier,
133
-      builder: (_, value, __) => Switch(
134
-        value: value,
135
-        onChanged: (change) => notifier.value = change,
136
-      ),
137
-    );
138
-    return ValueListenableBuilder<bool>(
139
-      valueListenable: notifier,
140
-      builder: (_, value, __) => SegmentedButton<bool>(
141
-        segments: const [
142
-          ButtonSegment(value: true, label: Text('是')),
143
-          ButtonSegment(value: false, label: Text('否')),
144
-        ],
145
-        selected: {value},
134
+      builder: (_, value, __) => SizedBox(
135
+        height: 24,
136
+        child: Switch(
137
+          value: value,
138
+          onChanged: (change) => notifier.value = change,
139
+        ),
146 140
       ),
147 141
     );
148 142
   }

+ 1 - 10
lib/page/sample_task/reap_sample_task/reap_sample_medicine_page.dart

@@ -164,6 +164,7 @@ class _ReapSampleMedicinePageState extends BaseState<ReapSampleMedicinePage> wit
164 164
         isDense: true,
165 165
         counterText: '',
166 166
       ),
167
+      style: const TextStyle(fontSize: 14),
167 168
       textInputAction: TextInputAction.next,
168 169
       inputFormatters: [],
169 170
     );
@@ -177,15 +178,5 @@ class _ReapSampleMedicinePageState extends BaseState<ReapSampleMedicinePage> wit
177 178
         onChanged: (change) => notifier.value = change,
178 179
       ),
179 180
     );
180
-    return ValueListenableBuilder<bool>(
181
-      valueListenable: notifier,
182
-      builder: (_, value, __) => SegmentedButton<bool>(
183
-        segments: const [
184
-          ButtonSegment(value: true, label: Text('是')),
185
-          ButtonSegment(value: false, label: Text('否')),
186
-        ],
187
-        selected: {value},
188
-      ),
189
-    );
190 181
   }
191 182
 }

+ 1 - 1
lib/page/sample_task/reap_sample_task/reap_sample_task_page.dart

@@ -164,7 +164,7 @@ class _ReapSampleTaskPageState extends BaseState<ReapSampleTaskPage> with Ticker
164 164
               Text(
165 165
                 tabTextList[index],
166 166
                 style: TextStyle(
167
-                  fontSize: select ? 18 : 15,
167
+                  fontSize: select ? 14 : 12,
168 168
                   color: select ? MyColor.c_333333 : MyColor.c_467F86,
169 169
                   fontWeight: select ? FontWeight.w700 : FontWeight.w400,
170 170
                 ),

+ 1 - 1
lib/page/sample_task/reap_sample_task/reap_sample_variety_page.dart

@@ -1,4 +1,3 @@
1
-import 'package:date_format/date_format.dart';
2 1
 import 'package:flutter/material.dart';
3 2
 import 'package:lszlgl/base/base_state.dart';
4 3
 import 'package:lszlgl/utils/date_time_utils.dart';
@@ -133,6 +132,7 @@ class _ReapSampleVarietyPageState extends BaseState<ReapSampleVarietyPage> with
133 132
         contentPadding: EdgeInsets.zero,
134 133
         isDense: true,
135 134
       ),
135
+      style: const TextStyle(fontSize: 14),
136 136
       textInputAction: TextInputAction.next,
137 137
       inputFormatters: [],
138 138
     );

+ 11 - 11
lib/page/sample_task/sample_task_list_page.dart

@@ -143,7 +143,7 @@ class _SampleTaskListPageState extends BaseLifecycleState<SampleTaskListPage> wi
143 143
         const Expanded(
144 144
           child: Text(
145 145
             '扦样任务单号',
146
-            style: TextStyle(color: MyColor.c_333333, fontSize: 18, fontWeight: FontWeight.w500),
146
+            style: TextStyle(color: MyColor.c_333333, fontSize: 14, fontWeight: FontWeight.w500),
147 147
           ),
148 148
         ),
149 149
         buildState(state),
@@ -154,7 +154,7 @@ class _SampleTaskListPageState extends BaseLifecycleState<SampleTaskListPage> wi
154 154
   Widget buildVLine() {
155 155
     return Container(
156 156
       width: 4,
157
-      height: 20,
157
+      height: 18,
158 158
       margin: const EdgeInsets.only(right: 8),
159 159
       decoration: const BoxDecoration(
160 160
         color: MyColor.c_25A6EE,
@@ -165,24 +165,24 @@ class _SampleTaskListPageState extends BaseLifecycleState<SampleTaskListPage> wi
165 165
 
166 166
   Widget buildState(String state) {
167 167
     return Container(
168
-      padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 4),
168
+      padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 6),
169 169
       decoration: BoxDecoration(
170 170
         color: MyColor.c_25A6EE.withOpacity(0.1),
171 171
         borderRadius: const BorderRadius.horizontal(left: Radius.circular(100)),
172 172
       ),
173 173
       child: Text(
174 174
         '状态:$state',
175
-        style: const TextStyle(color: MyColor.c_1383C2, fontSize: 16),
175
+        style: const TextStyle(color: MyColor.c_1383C2, fontSize: 13),
176 176
       ),
177 177
     );
178 178
   }
179 179
 
180 180
   Widget buildNumber(String number) {
181 181
     return Padding(
182
-      padding: const EdgeInsets.only(left: 12, top: 4, bottom: 6),
182
+      padding: const EdgeInsets.only(left: 8, top: 4, bottom: 8),
183 183
       child: Text(
184 184
         number,
185
-        style: const TextStyle(color: MyColor.c_333333, fontSize: 18, fontWeight: FontWeight.w500),
185
+        style: const TextStyle(color: MyColor.c_333333, fontSize: 14, fontWeight: FontWeight.w500),
186 186
       ),
187 187
     );
188 188
   }
@@ -208,7 +208,7 @@ class _SampleTaskListPageState extends BaseLifecycleState<SampleTaskListPage> wi
208 208
       ];
209 209
     }
210 210
     return Padding(
211
-      padding: const EdgeInsets.symmetric(horizontal: 12),
211
+      padding: const EdgeInsets.symmetric(horizontal: 8),
212 212
       child: LayoutBuilder(builder: (context, constraints) {
213 213
         return Wrap(
214 214
           spacing: 4,
@@ -218,7 +218,7 @@ class _SampleTaskListPageState extends BaseLifecycleState<SampleTaskListPage> wi
218 218
               width: constraints.maxWidth / 2 - 2,
219 219
               child: Text(
220 220
                 '${item.keys.first}:${item.values.first}',
221
-                style: const TextStyle(fontSize: 16, color: MyColor.c_666666),
221
+                style: const TextStyle(fontSize: 13, color: MyColor.c_666666),
222 222
               ),
223 223
             );
224 224
           }).toList(),
@@ -234,18 +234,18 @@ class _SampleTaskListPageState extends BaseLifecycleState<SampleTaskListPage> wi
234 234
         buildDivider(),
235 235
         Row(
236 236
           children: [
237
-            const SizedBox(width: 12),
237
+            const SizedBox(width: 8),
238 238
             Expanded(
239 239
               child: Text(
240 240
                 '[${item.qyryName ?? ''}]创建于${DateTimeUtils.yyyymmdd(timestamp: item.createTime) ?? ''}',
241
-                style: const TextStyle(fontSize: 16, color: MyColor.c_666666),
241
+                style: const TextStyle(fontSize: 13, color: MyColor.c_666666),
242 242
               ),
243 243
             ),
244 244
             const SizedBox(width: 4),
245 245
             MyButton(
246 246
               '开始扦样',
247 247
               onTap: () => startSample(),
248
-              fountSize: 16,
248
+              fountSize: 13,
249 249
               alignment: null,
250 250
               padding: const EdgeInsets.symmetric(vertical: 6, horizontal: 12),
251 251
             ),

+ 3 - 3
lib/page/sample_task/sample_task_list_tab_page.dart

@@ -89,7 +89,7 @@ class _SampleTaskListTabPageState extends BaseLifecycleState<SampleTaskListTabPa
89 89
   Widget buildTab() {
90 90
     return Container(
91 91
       clipBehavior: Clip.hardEdge,
92
-      height: 36,
92
+      height: 32,
93 93
       decoration: const BoxDecoration(
94 94
         color: Colors.white,
95 95
         borderRadius: BorderRadius.all(Radius.circular(100)),
@@ -109,12 +109,12 @@ class _SampleTaskListTabPageState extends BaseLifecycleState<SampleTaskListTabPa
109 109
         indicatorSize: TabBarIndicatorSize.tab,
110 110
         dividerHeight: 0,
111 111
         labelStyle: const TextStyle(
112
-          fontSize: 14,
112
+          fontSize: 12,
113 113
           fontWeight: FontWeight.w500,
114 114
           color: Colors.white,
115 115
         ),
116 116
         unselectedLabelStyle: const TextStyle(
117
-          fontSize: 14,
117
+          fontSize: 12,
118 118
           color: MyColor.c_28A3ED,
119 119
         ),
120 120
         tabs: tabTextList.map((text) => Tab(text: text)).toList(),

+ 2 - 2
lib/page/user_center/account_manage_page.dart

@@ -41,7 +41,7 @@ class _AccountManagePageState extends BaseLifecycleState<AccountManagePage> {
41 41
       children: [
42 42
         myAppBar(title: '账号管理'),
43 43
         buildList(),
44
-        const SizedBox(height: 40),
44
+        const SizedBox(height: 32),
45 45
         MyButton(
46 46
           '退出登录',
47 47
           onTap: onLogout,
@@ -99,7 +99,7 @@ class _AccountManagePageState extends BaseLifecycleState<AccountManagePage> {
99 99
         fit: BoxFit.cover,
100 100
         imageUrl: user?.avatar ?? '',
101 101
         placeholder: (_, __) => const Center(child: CircularProgressIndicator()),
102
-        errorWidget: (context, url, error) => const Center(child: Icon(Icons.error)),
102
+        errorWidget: (context, url, error) => const Center(child: Icon(Icons.error, color: Colors.grey)),
103 103
       ),
104 104
     );
105 105
   }

+ 4 - 2
lib/page/user_center/change_pwd_page.dart

@@ -55,7 +55,7 @@ class _ChangePwdPageState extends BaseState<ChangePwdPage> {
55 55
       children: [
56 56
         myAppBar(title: '修改密码'),
57 57
         buildList(),
58
-        const SizedBox(height: 40),
58
+        const SizedBox(height: 32),
59 59
         MyButton(
60 60
           '确认修改',
61 61
           onTap: onChange,
@@ -72,7 +72,7 @@ class _ChangePwdPageState extends BaseState<ChangePwdPage> {
72 72
     return Container(
73 73
       margin: const EdgeInsets.symmetric(horizontal: 12),
74 74
       clipBehavior: Clip.hardEdge,
75
-      decoration: const BoxDecoration(borderRadius: BorderRadius.all(Radius.circular(8))),
75
+      decoration: const BoxDecoration(borderRadius: BorderRadius.all(Radius.circular(10))),
76 76
       child: Column(
77 77
         children: [
78 78
           CardItemWidget(
@@ -103,6 +103,7 @@ class _ChangePwdPageState extends BaseState<ChangePwdPage> {
103 103
               isDense: true,
104 104
               counterText: '',
105 105
             ),
106
+            style: const TextStyle(fontSize: 14),
106 107
             maxLength: 6,
107 108
             inputFormatters: [FilteringTextInputFormatter.allow(RegExp(r'\d'))],
108 109
           ),
@@ -130,6 +131,7 @@ class _ChangePwdPageState extends BaseState<ChangePwdPage> {
130 131
         contentPadding: EdgeInsets.zero,
131 132
         isDense: true,
132 133
       ),
134
+      style: TextStyle(fontSize: 14),
133 135
       inputFormatters: [],
134 136
     );
135 137
   }

+ 34 - 32
lib/page/user_center/user_center_page.dart

@@ -58,7 +58,7 @@ class _UserCenterPageState extends BaseLifecycleState<UserCenterPage> with Autom
58 58
                   child: Column(
59 59
                     children: [
60 60
                       buildUserInfo(),
61
-                      const SizedBox(height: 30),
61
+                      const SizedBox(height: 24),
62 62
                       buildList(),
63 63
                     ],
64 64
                   ),
@@ -77,37 +77,38 @@ class _UserCenterPageState extends BaseLifecycleState<UserCenterPage> with Autom
77 77
         onTap: startAccountManage,
78 78
         child: Container(
79 79
           margin: const EdgeInsets.symmetric(horizontal: 12),
80
-          padding: const EdgeInsets.only(left: 8, right: 14, top: 14, bottom: 26),
81 80
           clipBehavior: Clip.hardEdge,
82 81
           decoration: BoxDecoration(
83 82
             borderRadius: const BorderRadius.all(Radius.circular(12)),
84 83
             boxShadow: [BoxShadow(color: Colors.black.withOpacity(0.1), offset: const Offset(0, 5), blurRadius: 4)],
85 84
             image: const DecorationImage(image: AssetImage(imgHomeListBg), fit: BoxFit.fill),
86 85
           ),
87
-          child: Column(
86
+          child: Row(
87
+            crossAxisAlignment: CrossAxisAlignment.start,
88 88
             children: [
89
-              buildUserText(user?.dept?.name ?? ''),
90
-              Row(
91
-                children: [
92
-                  buildUserAvatar(user?.avatar ?? ''),
93
-                  const SizedBox(width: 12),
94
-                  Column(
95
-                    crossAxisAlignment: CrossAxisAlignment.start,
96
-                    mainAxisSize: MainAxisSize.min,
97
-                    children: [
98
-                      Text(
99
-                        user?.nickname ?? '',
100
-                        style: const TextStyle(fontSize: 17, color: Color(0xFF333333), fontWeight: FontWeight.w500),
101
-                      ),
102
-                      const SizedBox(height: 14),
103
-                      Text(
104
-                        user?.username ?? '',
105
-                        style: const TextStyle(fontSize: 17, color: Color(0xFF333333), fontWeight: FontWeight.w500),
106
-                      ),
107
-                    ],
108
-                  ),
109
-                ],
89
+              Expanded(
90
+                child: Row(
91
+                  children: [
92
+                    buildUserAvatar(user?.avatar ?? ''),
93
+                    Column(
94
+                      crossAxisAlignment: CrossAxisAlignment.start,
95
+                      mainAxisSize: MainAxisSize.min,
96
+                      children: [
97
+                        Text(
98
+                          user?.nickname ?? '',
99
+                          style: const TextStyle(fontSize: 14, color: Color(0xFF333333), fontWeight: FontWeight.w500),
100
+                        ),
101
+                        const SizedBox(height: 14),
102
+                        Text(
103
+                          user?.username ?? '',
104
+                          style: const TextStyle(fontSize: 14, color: Color(0xFF333333), fontWeight: FontWeight.w500),
105
+                        ),
106
+                      ],
107
+                    ),
108
+                  ],
109
+                ),
110 110
               ),
111
+              buildDeptText(user?.dept?.name ?? ''),
111 112
             ],
112 113
           ),
113 114
         ),
@@ -117,8 +118,9 @@ class _UserCenterPageState extends BaseLifecycleState<UserCenterPage> with Autom
117 118
 
118 119
   Widget buildUserAvatar(String imageUrl) {
119 120
     return Container(
120
-      width: 75,
121
-      height: 75,
121
+      width: 72,
122
+      height: 72,
123
+      margin: const EdgeInsets.symmetric(vertical: 24, horizontal: 12),
122 124
       clipBehavior: Clip.hardEdge,
123 125
       decoration: const BoxDecoration(
124 126
         color: Color(0xFF7085A1),
@@ -129,19 +131,19 @@ class _UserCenterPageState extends BaseLifecycleState<UserCenterPage> with Autom
129 131
         fit: BoxFit.cover,
130 132
         imageUrl: imageUrl,
131 133
         placeholder: (_, __) => const Center(child: CircularProgressIndicator()),
132
-        errorWidget: (context, url, error) => const Center(child: Icon(Icons.error)),
134
+        errorWidget: (context, url, error) => const Center(child: Icon(Icons.error, color: Colors.grey)),
133 135
       ),
134 136
     );
135 137
   }
136 138
 
137
-  Widget buildUserText(String text) {
138
-    return Align(
139
-      alignment: Alignment.topRight,
139
+  Widget buildDeptText(String text) {
140
+    return Padding(
141
+      padding: const EdgeInsets.only(top: 12, right: 12),
140 142
       child: Text(
141 143
         text,
142 144
         style: const TextStyle(
143 145
           color: Color(0xFF333333),
144
-          fontSize: 13,
146
+          fontSize: 12,
145 147
           fontWeight: FontWeight.w500,
146 148
         ),
147 149
       ),
@@ -150,7 +152,7 @@ class _UserCenterPageState extends BaseLifecycleState<UserCenterPage> with Autom
150 152
 
151 153
   Widget buildList() {
152 154
     return Container(
153
-      margin: const EdgeInsets.symmetric(horizontal: 14),
155
+      margin: const EdgeInsets.symmetric(horizontal: 12),
154 156
       clipBehavior: Clip.hardEdge,
155 157
       decoration: const BoxDecoration(borderRadius: BorderRadius.all(Radius.circular(10))),
156 158
       child: Column(

+ 1 - 1
lib/widget/button.dart

@@ -28,7 +28,7 @@ class MyButton extends StatelessWidget {
28 28
     this.height,
29 29
     this.minHeight,
30 30
     this.onTap,
31
-    this.fountSize = 18,
31
+    this.fountSize = 14,
32 32
     this.fountColor = Colors.white,
33 33
     this.fontWeight,
34 34
     this.margin,

+ 7 - 7
lib/widget/card_item.dart

@@ -53,14 +53,14 @@ class CardItemWidget extends StatelessWidget {
53 53
         children: [
54 54
           showTopLine ? const Divider(color: Color(0xFFF3F3F3), height: 0, thickness: 1) : const SizedBox.shrink(),
55 55
           Container(
56
-            constraints: const BoxConstraints(minHeight: 58),
57
-            padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 12),
56
+            constraints: const BoxConstraints(minHeight: 48),
57
+            padding: const EdgeInsets.all(12),
58 58
             color: backgroundColor,
59 59
             child: Row(
60 60
               children: [
61 61
                 buildLeading(),
62 62
                 buildTitle(),
63
-                const SizedBox(width: 8),
63
+                const SizedBox(width: 4),
64 64
                 buildRight(),
65 65
                 buildTrailing(),
66 66
               ],
@@ -75,7 +75,7 @@ class CardItemWidget extends StatelessWidget {
75 75
   Widget buildLeading() {
76 76
     if (leading == null) return const SizedBox.shrink();
77 77
     return Padding(
78
-      padding: const EdgeInsets.only(right: 8.0),
78
+      padding: const EdgeInsets.only(right: 8),
79 79
       child: leading,
80 80
     );
81 81
   }
@@ -83,7 +83,7 @@ class CardItemWidget extends StatelessWidget {
83 83
   Widget buildTrailing() {
84 84
     if (trailing == null) return const SizedBox.shrink();
85 85
     return Padding(
86
-      padding: const EdgeInsets.only(left: 8.0),
86
+      padding: const EdgeInsets.only(left: 8),
87 87
       child: trailing,
88 88
     );
89 89
   }
@@ -94,7 +94,7 @@ class CardItemWidget extends StatelessWidget {
94 94
         title,
95 95
         style: const TextStyle(
96 96
           color: Color(0xFF333333),
97
-          fontSize: 16,
97
+          fontSize: 14,
98 98
           fontWeight: FontWeight.w500,
99 99
         ),
100 100
       ),
@@ -111,7 +111,7 @@ class CardItemWidget extends StatelessWidget {
111 111
         textAlign: TextAlign.right,
112 112
         style: TextStyle(
113 113
           color: (rightText?.isNotEmpty ?? false) ? const Color(0xFF01B2C8) : MyColor.c_666666,
114
-          fontSize: 16,
114
+          fontSize: 14,
115 115
           fontWeight: FontWeight.w500,
116 116
         ),
117 117
       );

File diff suppressed because it is too large
+ 136 - 136
pubspec.lock