fix:修复 考勤 服务器的用户默认头像显示报错的问题
This commit is contained in:
parent
a914df7c1b
commit
2246f448a2
@ -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<CheckingInListPage> {
|
||||
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),
|
||||
|
||||
@ -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<CheckingInStaffListPage> {
|
||||
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(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user