senderVoiceMessageWidget method

Widget senderVoiceMessageWidget(
  1. BuildContext context,
  2. String duration
)

Implementation

Widget senderVoiceMessageWidget(BuildContext context, String duration) {
  final isDark = Theme.of(context).brightness == Brightness.dark;
  return Container(
    decoration: BoxDecoration(
      borderRadius: BorderRadius.circular(20),
      color: isDark ? const Color(0xff876969) : Colors.tealAccent,
    ),
    height: 40,
    child: Row(
      children: [
        const SizedBox(
          width: 10,
        ),
        Icon(
          Icons.play_circle,
          color: isDark ? Colors.white54 : Colors.blue,
          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),
          ],
        ),
      ],
    ),
  );
}