buildGetNextPageParameters method
- List<
EndShipper> ? currentPageItems, - {int? pageSize}
Builds the ListParametersType
-type parameter set to use to retrieve the next page of a PaginatedCollection
.
This method should be overridden by subclasses to provide the appropriate parameters for the next page request.
Implementation
@override
ListEndShippers buildGetNextPageParameters(List<EndShipper>? currentPageItems,
{int? pageSize}) {
ListEndShippers parameters = filters ?? ListEndShippers();
// EndShippers go oldest to newest, so only can use afterId
parameters.afterId = currentPageItems?.last.id;
if (pageSize != null) {
parameters.pageSize = pageSize;
}
return parameters;
}