loadNextPage method

Future<int> loadNextPage(
  1. int pageSize,
  2. int offset,
  3. int? columnSortIndex,
  4. bool? sortAscending,
)

Implementation

Future<int> loadNextPage(int pageSize, int offset, int? columnSortIndex,
    bool? sortAscending) async {
  try {
    lastDetails = await getNextPage(
      NextPageRequest(
        pageSize,
        offset,
        columnSortIndex: columnSortIndex,
        sortAscending: sortAscending,
      ),
    );
    return lastDetails?.totalRows ?? 0;
  } catch (error) {
    return Future.error(error);
  }
}