diff --git a/lib/pages/message/conversation_tab.dart b/lib/pages/message/conversation_tab.dart index e8fcda5..57682de 100644 --- a/lib/pages/message/conversation_tab.dart +++ b/lib/pages/message/conversation_tab.dart @@ -109,12 +109,7 @@ class _ConversationTabState extends State decoration: BoxDecoration( borderRadius: BorderRadius.circular(28), image: DecorationImage( - image: (userInfo?.avatarUrl?.isNotEmpty ?? false) - ? NetworkImage(userInfo!.avatarUrl!) - : const AssetImage( - Assets.imagesAvatarsExample, - ) - as ImageProvider, + image: NetworkImage(userInfo!.avatarUrl!), fit: BoxFit.cover, ), ), @@ -131,9 +126,7 @@ class _ConversationTabState extends State children: [ Expanded( child: Text( - (userInfo?.nickName?.isNotEmpty ?? false) - ? userInfo!.nickName! - : conversation.id, // 如果没有昵称,显示用户ID + userInfo.nickName ?? '', // 如果没有昵称,显示用户ID style: const TextStyle( fontSize: 16, fontWeight: FontWeight.w500,