playOrPause method

Future<void> playOrPause()

For changing state between play and pause

if(video is playing) then it will pause

if(video is in pause state) then it will start playing

Implementation

Future<void> playOrPause() async {
  isPlay.value = !isPlay.value;
  await _player.playOrPause();
}