PaginationUtils class

Utility class for common pagination operations.

This class provides helper methods for handling paginated API responses, making it easier to fetch multiple pages of data and combine the results.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

fetchAllPages(dynamic endpoint, {Map<String, dynamic>? parameters, String pageParamName = 'page', String perPageParamName = 'per_page', int startPage = 1, List dataExtractor(ResponseModel response)?, bool stopCondition(ResponseModel response)?}) Future<ResponseModel>
Fetches all pages of a paginated API endpoint.
hasMorePages(ResponseModel response, int currentPageItemCount) bool
Determines if there are more pages available based on response metadata.