seekTo method

void seekTo(
  1. Duration position, {
  2. bool allowSeekAhead = true,
})

Seek to any position. Video auto plays after seeking. The optional allowSeekAhead parameter determines whether the player will make a new request to the server if the seconds parameter specifies a time outside of the currently buffered video data. Default allowSeekAhead = true

Implementation

void seekTo(Duration position, {bool allowSeekAhead = true}) {
  _callMethod('seekTo(${position.inMilliseconds / 1000},$allowSeekAhead)');
  play();
  updateValue(value.copyWith(position: position));
}