togglePlay method

Future togglePlay()

Implementation

Future togglePlay() async {
  if (isPlaying()) {
    pause(_current!.type);
  } else {
    play();
  }
  return Future.value(_media);
}