This commit is contained in:
louis 2024-04-15 15:17:34 +08:00
parent 61e09970d4
commit 62e06958a0
1 changed files with 17 additions and 8 deletions

View File

@ -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/models/user_info.model.dart';
import 'package:sk_base_mobile/util/debouncer.dart'; import 'package:sk_base_mobile/util/debouncer.dart';
import 'package:sk_base_mobile/util/screen_adaper_util.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/empty.dart';
import 'package:sk_base_mobile/widgets/fade_in_cache_image.dart'; import 'package:sk_base_mobile/widgets/fade_in_cache_image.dart';
@ -55,6 +56,7 @@ class AgentSearch extends StatelessWidget {
vertical: ScreenAdaper.height(10), vertical: ScreenAdaper.height(10),
horizontal: ScreenAdaper.width(10)), horizontal: ScreenAdaper.width(10)),
hintText: '姓名', hintText: '姓名',
hintStyle: TextStyle(fontSize: ScreenAdaper.height(30)),
floatingLabelBehavior: FloatingLabelBehavior.always, floatingLabelBehavior: FloatingLabelBehavior.always,
prefixIcon: const Icon(Icons.search), prefixIcon: const Icon(Icons.search),
// searchBarController有值时不显示 // searchBarController有值时不显示
@ -112,21 +114,28 @@ class AgentSearch extends StatelessWidget {
vertical: ScreenAdaper.height(10)), vertical: ScreenAdaper.height(10)),
child: Row( child: Row(
children: [ children: [
ClipRRect( SkAvatar(
borderRadius: BorderRadius.circular(ScreenAdaper.sp(15)), url: controller.list[index].avatar,
child: FadeInCacheImage(
url: controller.list[index].avatar ?? '',
width: ScreenAdaper.width(60),
height: ScreenAdaper.width(60),
),
), ),
// ClipRRect(
// borderRadius: BorderRadius.circular(ScreenAdaper.sp(15)),
// child: FadeInCacheImage(
// url: controller.list[index].avatar ?? '',
// width: ScreenAdaper.width(60),
// height: ScreenAdaper.width(60),
// ),
// ),
SizedBox( SizedBox(
width: ScreenAdaper.width(20), width: ScreenAdaper.width(20),
), ),
Text( Text(
'${controller.list[index].nickname}', '${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) ...[ if (controller.list[index].dept != null) ...[
SizedBox( SizedBox(
width: ScreenAdaper.width(20), width: ScreenAdaper.width(20),