|
|
@ -119,6 +119,10 @@ class AudioPlayerState extends State<AudioPlayerWidget> {
|
|
|
|
AudioPlayerWidget.wavesCount)
|
|
|
|
AudioPlayerWidget.wavesCount)
|
|
|
|
.round();
|
|
|
|
.round();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
if (state.inMilliseconds.toDouble() == maxPosition) {
|
|
|
|
|
|
|
|
audioPlayer.stop();
|
|
|
|
|
|
|
|
audioPlayer.seek(null);
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
onDurationChanged ??= audioPlayer.durationStream.listen((max) {
|
|
|
|
onDurationChanged ??= audioPlayer.durationStream.listen((max) {
|
|
|
|
if (max == null || max == Duration.zero) return;
|
|
|
|
if (max == null || max == Duration.zero) return;
|
|
|
|