AnimatedWaveform constructor

const AnimatedWaveform({
  1. Key? key,
  2. required bool isRecording,
  3. int barCount = 20,
  4. double maxBarHeight = 40,
  5. Duration speed = const Duration(seconds: 2),
  6. Color? recordingColor = Colors.blueAccent,
  7. Color? idleColor = Colors.grey,
})

Creates an AnimatedWaveform widget.

  • isRecording controls whether animation is active.
  • barCount sets how many bars are shown.
  • maxBarHeight defines the tallest possible bar.
  • speed determines how fast the bars animate.
  • recordingColor and idleColor control color states.

Implementation

const AnimatedWaveform({
  super.key,
  required this.isRecording,
  this.barCount = 20,
  this.maxBarHeight = 40,
  this.speed = const Duration(seconds: 2),
  this.recordingColor = Colors.blueAccent,
  this.idleColor = Colors.grey,
});