buildProfile method
Implementation
Widget buildProfile(BuildContext context, String name, bool isSender) {
final profileBuilder =
isSender ? senderProfileBuilder : receiverProfileBuilder;
if (profileBuilder != null) {
if (profileNameStyle == null) return profileBuilder.call(context, name);
return DefaultTextStyle(
style: profileNameStyle!,
child: profileBuilder.call(context, name),
);
}
return Column(
children: [
ClipRRect(
borderRadius: BorderRadius.circular(16),
child: Container(
color: const Color(0xFFE9E9E9),
width: 40,
height: 40,
child: const Icon(Icons.person),
),
),
const Gap(4),
Text(name, style: profileNameStyle),
],
);
}