diff --git a/CHANGELOG.md b/CHANGELOG.md index 5debdd7c..6aa27049 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.1.2 + +- Fixed [#350](https://github.com/SimformSolutionsPvtLtd/audio_waveforms/issues/350) - Waveform clipping at starting position + ## 1.1.1 - Downgrade flutter_lint version to support flutter version 3.10.x diff --git a/lib/src/audio_waveforms.dart b/lib/src/audio_waveforms.dart index 17ac6c57..826f0905 100644 --- a/lib/src/audio_waveforms.dart +++ b/lib/src/audio_waveforms.dart @@ -41,13 +41,14 @@ class _AudioWaveformsState extends State { Offset _dragOffset = Offset.zero; double _initialOffsetPosition = 0.0; - double _initialPosition = 0.0; + late double _initialPosition; Duration currentlyRecordedDuration = Duration.zero; late StreamSubscription streamSubscription; @override void initState() { super.initState(); + _initialPosition = -(widget.waveStyle.waveThickness / 2); widget.recorderController.addListener(_recorderControllerListener); streamSubscription = widget.recorderController.onCurrentDuration.listen((duration) { diff --git a/pubspec.yaml b/pubspec.yaml index 2e261fdc..6f814aaa 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: audio_waveforms description: A Flutter package that allow you to generate waveform while recording audio or from audio file. -version: 1.1.1 +version: 1.1.2 homepage: https://github.com/SimformSolutionsPvtLtd/audio_waveforms issue_tracker: https://github.com/SimformSolutionsPvtLtd/audio_waveforms/issues