pausePlayer method

Future<void> pausePlayer()

Use this to pause the playing audio.

Implementation

Future<void> pausePlayer() async {
  final isPaused = await AudioWaveformsInterface.instance
      .pausePlayer(_playerKey.toString());
  if (isPaused) {
    setPlayerState(PlayerState.paused);
  }
  notifyListeners();
}