From 62e06958a0e83394fa40bb8341d9a56630e2dd7e Mon Sep 17 00:00:00 2001 From: louis <869322496@qq.com> Date: Mon, 15 Apr 2024 15:17:34 +0800 Subject: [PATCH] opti: ui --- .../components/agent_search.dart | 25 +++++++++++++------ 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/lib/screens/new_inventory_inout/components/agent_search.dart b/lib/screens/new_inventory_inout/components/agent_search.dart index b351694..913b9ef 100644 --- a/lib/screens/new_inventory_inout/components/agent_search.dart +++ b/lib/screens/new_inventory_inout/components/agent_search.dart @@ -9,6 +9,7 @@ import 'package:sk_base_mobile/constants/bg_color.dart'; import 'package:sk_base_mobile/models/user_info.model.dart'; import 'package:sk_base_mobile/util/debouncer.dart'; import 'package:sk_base_mobile/util/screen_adaper_util.dart'; +import 'package:sk_base_mobile/widgets/core/sk_avatar.dart'; import 'package:sk_base_mobile/widgets/empty.dart'; import 'package:sk_base_mobile/widgets/fade_in_cache_image.dart'; @@ -55,6 +56,7 @@ class AgentSearch extends StatelessWidget { vertical: ScreenAdaper.height(10), horizontal: ScreenAdaper.width(10)), hintText: '姓名', + hintStyle: TextStyle(fontSize: ScreenAdaper.height(30)), floatingLabelBehavior: FloatingLabelBehavior.always, prefixIcon: const Icon(Icons.search), // 当searchBarController有值时不显示 @@ -112,21 +114,28 @@ class AgentSearch extends StatelessWidget { vertical: ScreenAdaper.height(10)), child: Row( children: [ - ClipRRect( - borderRadius: BorderRadius.circular(ScreenAdaper.sp(15)), - child: FadeInCacheImage( - url: controller.list[index].avatar ?? '', - width: ScreenAdaper.width(60), - height: ScreenAdaper.width(60), - ), + SkAvatar( + url: controller.list[index].avatar, ), + // ClipRRect( + // borderRadius: BorderRadius.circular(ScreenAdaper.sp(15)), + // child: FadeInCacheImage( + // url: controller.list[index].avatar ?? '', + // width: ScreenAdaper.width(60), + // height: ScreenAdaper.width(60), + // ), + // ), SizedBox( width: ScreenAdaper.width(20), ), + Text( '${controller.list[index].nickname}', - style: TextStyle(fontSize: ScreenAdaper.height(25)), + style: TextStyle( + fontSize: ScreenAdaper.height(30), + fontWeight: FontWeight.w600), ), + Spacer(), if (controller.list[index].dept != null) ...[ SizedBox( width: ScreenAdaper.width(20),