seekTo static method

Future seekTo({
  1. required int positionedMilliseconds,
})

Seeks the current track to the given positionedMilliseconds

Throws a PlatformException if seeking failed Throws a MissingPluginException if the method is not implemented on the native platforms.

Implementation

static Future seekTo({required int positionedMilliseconds}) async {
  try {
    await _channel.invokeMethod(MethodNames.seekTo,
        {ParamNames.positionedMilliseconds: positionedMilliseconds});
  } on Exception catch (e) {
    _logException(MethodNames.seekTo, e);
    rethrow;
  }
}