receiverVoiceMessageWidget method
Implementation
Widget receiverVoiceMessageWidget(BuildContext context, String duration) {
final isDark = Theme.of(context).brightness == Brightness.dark;
return Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20),
color: isDark ? Colors.black26 : Colors.blueGrey[100],
),
height: 40,
child: Row(
children: [
const SizedBox(
width: 10,
),
const Icon(
Icons.play_circle,
color: Colors.red,
size: 30,
),
const SizedBox(
width: 10,
),
duration.cap,
const SizedBox(
width: 10,
),
AudioWave(
height: 32,
animation: false,
width: MediaQuery.of(context).size.width / 2,
spacing: 3,
bars: [
AudioWaveBar(height: 10, color: Colors.lightBlueAccent),
AudioWaveBar(height: 30, color: Colors.blue),
AudioWaveBar(height: 70, color: Colors.black),
AudioWaveBar(height: 40),
AudioWaveBar(height: 20, color: Colors.orange),
AudioWaveBar(height: 10, color: Colors.lightBlueAccent),
AudioWaveBar(height: 30, color: Colors.blue),
AudioWaveBar(height: 70, color: Colors.black),
AudioWaveBar(height: 40),
AudioWaveBar(height: 20, color: Colors.orange),
AudioWaveBar(height: 10, color: Colors.lightBlueAccent),
AudioWaveBar(height: 30, color: Colors.blue),
AudioWaveBar(height: 70, color: Colors.black),
AudioWaveBar(height: 40),
AudioWaveBar(height: 20, color: Colors.orange),
AudioWaveBar(height: 10, color: Colors.lightBlueAccent),
AudioWaveBar(height: 30, color: Colors.blue),
AudioWaveBar(height: 70, color: Colors.black),
AudioWaveBar(height: 40),
AudioWaveBar(height: 20, color: Colors.orange),
],
),
],
),
);
}