myCustomChatMiniCard function
Custom MiniCard builder for chat sessions Displays small participant cards with chat-specific styling
Implementation
Widget myCustomChatMiniCard({
required String name,
required bool showWaveform,
overlayPosition,
barColor,
textColor,
imageSource,
roundedImage,
imageStyle,
}) {
return Container(
width: 80,
height: 80,
decoration: BoxDecoration(
gradient: LinearGradient(
colors: showWaveform
? [Colors.green.shade600, Colors.lightGreen.shade400]
: [Colors.grey.shade700, Colors.grey.shade500],
begin: Alignment.topLeft,
end: Alignment.bottomRight,
),
borderRadius: BorderRadius.circular(10),
border: Border.all(
color: showWaveform ? Colors.white : Colors.grey.shade400,
width: 2,
),
),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(
showWaveform ? Icons.chat_bubble : Icons.person,
color: Colors.white,
size: 24,
),
SizedBox(height: 4),
Text(
name,
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
fontSize: 10,
),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
],
),
);
}