seekTo method Null safety

Future<void> seekTo(
  1. Duration position

Sets the video's current timestamp to be at moment. The next time the video is played it will resume from the given moment.

If moment is outside of the video's full range it will be automatically and silently clamped.


Future<void> seekTo(Duration position) async {
  if (_isDisposedOrNotInitialized) {
  if (position > value.duration) {
    position = value.duration;
  } else if (position < const Duration()) {
    position = const Duration();
  await _videoPlayerPlatform.seekTo(_textureId, position);