pause method

Future<int> pause()

Pauses the audio that is currently playing.

If you call resume later, the audio will resume from the point that it has been paused.

Implementation

Future<int> pause() async {
  final int result = await _invokeMethod('pause');

  if (result == 1) {
    state = AudioPlayerState.PAUSED;
  }

  return result;
}