seekToPrevious method Null safety

Future<void> seekToPrevious()

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

Implementation

Future<void> seekToPrevious() async {
  if (hasPrevious) {
    await seek(Duration.zero, index: previousIndex);
  }
}