seekToNext method Null safety

Future<void> seekToNext()

Seek to the next item, or does nothing if there is no next item.

Implementation

Future<void> seekToNext() async {
  if (hasNext) {
    await seek(Duration.zero, index: nextIndex);
  }
}