RectangleWaveform constructor

RectangleWaveform({
  1. Key? key,
  2. required List<double> samples,
  3. required double height,
  4. required double width,
  5. Duration? maxDuration,
  6. Duration? elapsedDuration,
  7. Color activeColor = Colors.red,
  8. Color inactiveColor = Colors.blue,
  9. Gradient? activeGradient,
  10. Gradient? inactiveGradient,
  11. double borderWidth = 1.0,
  12. Color activeBorderColor = Colors.white,
  13. Color inactiveBorderColor = Colors.white,
  14. bool showActiveWaveform = true,
  15. bool absolute = false,
  16. bool invert = false,
  17. bool isRoundedRectangle = false,
  18. bool isCentered = false,
})

Implementation

RectangleWaveform({
  super.key,
  required super.samples,
  required super.height,
  required super.width,
  super.maxDuration,
  super.elapsedDuration,
  this.activeColor = Colors.red,
  this.inactiveColor = Colors.blue,
  this.activeGradient,
  this.inactiveGradient,
  this.borderWidth = 1.0,
  this.activeBorderColor = Colors.white,
  this.inactiveBorderColor = Colors.white,
  super.showActiveWaveform = true,
  super.absolute = false,
  super.invert = false,
  this.isRoundedRectangle = false,
  this.isCentered = false,
}) : assert(
        borderWidth >= 0 && borderWidth <= 1.0,
        'BorderWidth must be between 0 and 1',
      );