updatePagination method

void updatePagination(
  1. PaginatedResponse response
)

update the pagination

Implementation

void updatePagination(PaginatedResponse response) {
  _pagination = response.pagination;
  _currentLength += response.data.length;
  _hasNextPage = _pagination!.when(
    page: (_, __, total) =>
        _pagination!.hasNextPage && _currentLength < total,
    cursor: (_, __, hasNext) => hasNext,
  );
}