I needed some help regarding using audioplayer package in flutter, i found a piece of code thats understandable except the PlayerState.PLAYING
part, is this PlayerState a part of audioPlayers
package or what?
Code:
//listen to states: playing paused stopped
audioPlayer.onPlayerStateChanged.listen((state){
setState(() {
isPlaying = state == PlayerState.PLAYING;
});
});
Also if anyone can tell the right way to listen to states using audioPlayers
.
Check this official documentation here to get your correct answer. Currently I guess its PlayerState.playing
used.