diff --git a/lib/main/lockDetail/checkingIn/checkingInList/checkingInList_page.dart b/lib/main/lockDetail/checkingIn/checkingInList/checkingInList_page.dart index 17e73087..2e80f194 100755 --- a/lib/main/lockDetail/checkingIn/checkingInList/checkingInList_page.dart +++ b/lib/main/lockDetail/checkingIn/checkingInList/checkingInList_page.dart @@ -1,3 +1,4 @@ +import 'package:cached_network_image/cached_network_image.dart'; import 'package:date_format/date_format.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -409,10 +410,23 @@ class _CheckingInListPageState extends State { else ClipRRect( borderRadius: BorderRadius.circular(100.w), - child: Image.network( - headUrl, + child: CachedNetworkImage( width: 60.w, height: 60.w, + imageUrl: headUrl, + placeholder: (BuildContext context, String url) => + const SizedBox(), + errorWidget: + (BuildContext context, String url, Object error) => + Container( + color: const Color(0xffEBF4FF), + child: Center( + child: Text( + name!.substring(0, 2), + style: TextStyle( + fontSize: 22.sp, color: const Color(0xff7F9CF5)), + )), + ), ), ), SizedBox(width: 20.w), diff --git a/lib/main/lockDetail/checkingIn/checkingInStaff/checkingInSetStaffList/checkingInStaffList_page.dart b/lib/main/lockDetail/checkingIn/checkingInStaff/checkingInSetStaffList/checkingInStaffList_page.dart index 9f58f45e..b9d88109 100755 --- a/lib/main/lockDetail/checkingIn/checkingInStaff/checkingInSetStaffList/checkingInStaffList_page.dart +++ b/lib/main/lockDetail/checkingIn/checkingInStaff/checkingInSetStaffList/checkingInStaffList_page.dart @@ -1,3 +1,4 @@ +import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_slidable/flutter_slidable.dart'; @@ -154,10 +155,23 @@ class _CheckingInStaffListPageState extends State { else ClipRRect( borderRadius: BorderRadius.circular(100.w), - child: Image.network( - staffListItem.headurl!, + child: CachedNetworkImage( width: 60.w, height: 60.w, + imageUrl: staffListItem.headurl!, + placeholder: (BuildContext context, String url) => + const SizedBox(), + errorWidget: + (BuildContext context, String url, Object error) => + Container( + color: const Color(0xffEBF4FF), + child: Center( + child: Text( + staffListItem.staffName!.substring(0, 2), + style: TextStyle( + fontSize: 22.sp, color: const Color(0xff7F9CF5)), + )), + ), ), ), SizedBox(