flutter_playout
flutter_playout copied to clipboard
How to play URL voice notes in a ListView
When I play a voice note in a listView, the slider on the first index only moves, the rest of the nth ones no longer works , how can I solve this?
This is my sample project.
Hi @KhuramKhalid , can you help me resolve the issue ?
The audio player is currently built to run as singleton so creating multiple instances in a list might not work as expected. Instead what you can do is create one instance of audio player in your main.dart
and pass that to your audio_widget.dart
. Then keep all your individual player state in audio_widget.dart
and pass it to the audio player instance. That way behind the scenes it'll be a single audio player playing multiple URLs. I haven't tried this but in theory it should work.