PaginationResponse<T>.fromList constructor
PaginationResponse<T>.fromList (
- List<
T> items
Creates a single-page PaginationResponse from a list of items
Useful when you have all data in memory and want to display it in a paginated format.
Implementation
factory PaginationResponse.fromList(List<T> items) {
return PaginationResponse<T>(
items: items,
total: items.length,
skip: 0,
limit: items.length,
isLastPage: true,
nextPageKey: null,
);
}