|
|
|
@ -5,6 +5,7 @@ import 'package:get/get.dart'; |
|
|
|
import 'package:tdesign_flutter/tdesign_flutter.dart'; |
|
|
|
import 'package:im_flutter_sdk/im_flutter_sdk.dart'; |
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
|
|
|
import 'package:cached_network_image/cached_network_image.dart'; |
|
|
|
import '../../controller/message/conversation_controller.dart'; |
|
|
|
import '../../widget/message/emoji_text_widget.dart'; |
|
|
|
import '../../config/emoji_config.dart'; |
|
|
|
@ -140,27 +141,36 @@ class _ConversationTabState extends State<ConversationTab> |
|
|
|
height: 56, |
|
|
|
decoration: BoxDecoration( |
|
|
|
borderRadius: BorderRadius.circular(28), |
|
|
|
image: (userInfo?.avatarUrl != null && userInfo!.avatarUrl!.isNotEmpty) |
|
|
|
? DecorationImage( |
|
|
|
image: NetworkImage(userInfo.avatarUrl!), |
|
|
|
color: Colors.grey[300], |
|
|
|
), |
|
|
|
child: ClipRRect( |
|
|
|
borderRadius: BorderRadius.circular(28), |
|
|
|
child: (userInfo?.avatarUrl != null && userInfo!.avatarUrl!.isNotEmpty) |
|
|
|
? CachedNetworkImage( |
|
|
|
imageUrl: userInfo.avatarUrl!, |
|
|
|
width: 56, |
|
|
|
height: 56, |
|
|
|
fit: BoxFit.cover, |
|
|
|
placeholder: (context, url) => Image.asset( |
|
|
|
Assets.imagesUserAvatar, |
|
|
|
width: 56, |
|
|
|
height: 56, |
|
|
|
fit: BoxFit.cover, |
|
|
|
), |
|
|
|
errorWidget: (context, url, error) => Image.asset( |
|
|
|
Assets.imagesUserAvatar, |
|
|
|
width: 56, |
|
|
|
height: 56, |
|
|
|
fit: BoxFit.cover, |
|
|
|
), |
|
|
|
) |
|
|
|
: null, |
|
|
|
color: (userInfo?.avatarUrl == null || (userInfo?.avatarUrl?.isEmpty ?? true)) |
|
|
|
? Colors.grey[300] |
|
|
|
: null, |
|
|
|
), |
|
|
|
child: (userInfo?.avatarUrl == null || (userInfo?.avatarUrl?.isEmpty ?? true)) |
|
|
|
? ClipRRect( |
|
|
|
borderRadius: BorderRadius.circular(28), |
|
|
|
child: Image.asset( |
|
|
|
: Image.asset( |
|
|
|
Assets.imagesUserAvatar, |
|
|
|
width: 56, |
|
|
|
height: 56, |
|
|
|
fit: BoxFit.cover, |
|
|
|
), |
|
|
|
) |
|
|
|
: null, |
|
|
|
), |
|
|
|
), |
|
|
|
const SizedBox(width: 12), |
|
|
|
Expanded( |
|
|
|
|