Skip to content

Commit 6e85c71

Browse files
author
Ephraim Nartey
committed
fix: update chat avatar design
1 parent b040674 commit 6e85c71

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

lib/ui/chatwoot_chat_page.dart

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -724,19 +724,23 @@ class _ChatwootChatState extends State<ChatwootChat> with WidgetsBindingObserver
724724
avatarBuilder: (user){
725725
return Row(
726726
children: [
727-
CachedNetworkImage(
728-
imageUrl: user.imageUrl ?? '',
729-
width: 30,
730-
height: 30,
731-
errorWidget: (_,__, ___){
732-
String name = "${user.firstName} ${user.lastName}";
733-
List<String> words = name.trim().split(RegExp(r'\s+'));
734-
String initials = words.map((word) => word[0].toUpperCase()).join();
735-
return PlaceholderCircle(
736-
text: initials,
737-
textColor: theme.primaryColor,
738-
);
739-
},
727+
ClipRRect(
728+
borderRadius: BorderRadius.all(Radius.circular(15)),
729+
child: CachedNetworkImage(
730+
imageUrl: user.imageUrl ?? '',
731+
width: 30,
732+
height: 30,
733+
fit:BoxFit.cover,
734+
errorWidget: (_,__, ___){
735+
String name = "${user.firstName} ${user.lastName}";
736+
List<String> words = name.trim().split(RegExp(r'\s+'));
737+
String initials = words.map((word) => word[0].toUpperCase()).join();
738+
return PlaceholderCircle(
739+
text: initials,
740+
textColor: theme.primaryColor,
741+
);
742+
},
743+
),
740744
),
741745
SizedBox(width: 5,)
742746
],

0 commit comments

Comments
 (0)