stop method

Future<int> stop()

Stops the audio that is currently playing.

The position is going to be reset and you will no longer be able to resume from the last point.

Implementation

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

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

  return result;
}