nextPage method

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

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

Implementation

@override
Future<ChannelUploadsList?> nextPage() async {
  final page = await _page.nextPage(_httpClient);
  if (page == null) {
    return null;
  }
  return ChannelUploadsList(
    page.uploads
        .map(
          (e) => Video(
            e.videoId,
            e.videoTitle,
            author,
            channel,
            e.videoUploadDate.toDateTime(),
            e.videoUploadDate,
            null,
            '',
            e.videoDuration,
            ThumbnailSet(e.videoId.value),
            null,
            Engagement(e.videoViews, null, null),
            false,
          ),
        )
        .toList(),
    author,
    channel,
    page,
    _httpClient,
  );
}