stopPlayer method

Future<void> stopPlayer ()

Stop current play audio

Implementation

Future<void> stopPlayer() async {
  if (isPlaying) {
    isPlaying = false;

    _playComplete();

    try {
      await _channel.invokeMethod('stopPlayer');
    } catch (e) {
      print(e);
    }
  }
}