seekTo method

  1. @override
Future<void> seekTo(
  1. Duration duration
)
override

Seeks the player to the specified duration.

Implementation

@override
Future<void> seekTo(Duration duration) async {
  try {
    return await _methodChannel.invokeMethod("seek", {
      "time": duration.inSeconds.toString(),
    });
  } catch (e) {
    log(e.toString());
    throw Exception("Unable to seek to the specified duration [Seek To]");
  }
}