playIcon method
Implementation
Widget playIcon() {
return GestureDetector(
onTap: () {
if (audioPlayer.state == ap.PlayerState.playing) {
pause();
} else {
play();
}
},
child: Icon(
audioPlayer.state == ap.PlayerState.playing
? Icons.pause
: Icons.play_arrow,
color: Colors.white,
size: 30,
),
);
}