diff --git a/lib/features/chat/presentation/widgets/chat_entry_widget.dart b/lib/features/chat/presentation/widgets/chat_entry_widget.dart index 389c53a7..34b13c94 100644 --- a/lib/features/chat/presentation/widgets/chat_entry_widget.dart +++ b/lib/features/chat/presentation/widgets/chat_entry_widget.dart @@ -46,15 +46,13 @@ class _ChatEntryWidgetState extends State { mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.start, children: [ - widget.chatRoom.users.toChatUser.profilePhotoPath == null - ? buildAvatarByUsername(widget.chatRoom.users.toChatUser.name) - : CircleAvatar( - radius: 24, - backgroundImage: NetworkImage( - widget.chatRoom.users.toChatUser.profilePhotoUrl, - ), - backgroundColor: Colors.white, - ), + CircleAvatar( + radius: 24, + backgroundImage: NetworkImage( + widget.chatRoom.users.toChatUser.profilePhotoUrl, + ), + backgroundColor: Colors.white, + ), const SizedBox(width: 12), Expanded( child: Column( @@ -95,25 +93,4 @@ class _ChatEntryWidgetState extends State { ), ); } - - buildAvatarByUsername(String username) { - username = username.trim(); - return Container( - width: 48, - height: 48, - alignment: Alignment.center, - decoration: BoxDecoration( - color: Color(0xFFEBF4FF), - shape: BoxShape.circle, - ), - child: Text( - username.split(' ').first[0] + username.split(' ')[1][0], - style: TextStyle( - color: Color(0xFF7F9CF5), - fontWeight: FontWeight.w400, - fontSize: 20, - ), - ), - ); - } }