nextPage method

  1. @override
Future<RelatedVideosList?> nextPage()
override

Fetches the next batch of videos or returns null if there are no more results.

Implementation

@override
Future<RelatedVideosList?> nextPage() async {
  final page = await _client.nextPage(_httpClient);
  if (page == null) {
    return null;
  }

  return RelatedVideosList(page.relatedVideos().toList(), page, _httpClient);
}