pause method

  1. @override
Future<void> pause()
override

Pauses the currently playing audio.

This method sends a request to the platform to pause the currently playing audio, if any.

Implementation

@override
Future<void> pause() async {
  try {
    await methodChannel.invokeMethod('pause');
  } on PlatformException catch (e) {
    throw PlatformException(code: e.code, message: e.message);
  }
}