SimformSolutionsPvtLtd / audio_waveforms

Use this plugin to generate waveforms while recording audio in any file formats supported by given encoders or from audio files. We can use gestures to scroll through the waveforms or seek to any position while playing audio and also style waveforms
https://pub.dev/packages/audio_waveforms
MIT License
245 stars 125 forks source link

Add clipRRect parameter to WaveStyle #258

Open seelrd opened 4 months ago

seelrd commented 4 months ago

With this, you can provide an RRect to clip paint with to WaveStyle. For example:

AudioWaveforms(
                    size: Size(MediaQuery.of(context).size.width, 200.0),
                    recorderController: recorderController,
                    waveStyle: WaveStyle(
                      clipRRect: RRect.fromLTRBR(0, 0, MediaQuery.of(context).size.width,
                          200, const Radius.circular(18)),
                    ),
                  );

This way waveforms can be painted inside a rectangle with border radius.

ujas-m-simformsolutions commented 2 months ago

@seelrd Thanks for your contribution. Can you please share what issue you were facing? Also, if it was with labels then you can pass durationLinesHeight to change height of the line height.

seelrd commented 1 month ago

@ujas-m-simformsolutions I needed clipRRect to be able to have border radius on wave style lines.