I have tried the following code but it didn't work.
AudioPlayer _audioPlayer = AudioPlayer();
play() async {
int result = await _audioPlayer.play('http://thedemos.in/mind/uploads/audio/WjYYX_Namaste2.mp3');
if (result == 1) {
setState(() {
isPlaying = true;
});
print('Success');
}
}