seekTo method

  1. @override
Future<void> seekTo(
  1. int position
)
override

Seeks to the specified position in the audio playback.

This method sends a request to the platform to seek to the specified position in the currently playing audio.

Implementation

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