I want to make an interface that has multiple audio, so when user clicks on icon play, it will play the audio of that letter. Do i have to use loop or what? Please send helpp. I tried but it's not working. The codes is in mess T_T . Thank you in advance.
This is the picture of interface example
CodePudding user response:
You can use a Flutter package to easily do that: just_audio.
First define an AudioPlayer
object, then set its asset file with something like:
player.setAsset('assets/$filename');
Then you can control it using:
player.play()
player.stop()
You should be able to follow the example project in the pub link.