loadNextPage method
Called by the advanced datatable controll to trigger a page load
Implementation
Future<int> loadNextPage(
int pageSize,
int offset,
int? columnSortIndex, {
bool? sortAscending,
}) async {
try {
lastDetails = await getNextPage(
NextPageRequest(
pageSize,
offset,
columnSortIndex: columnSortIndex,
sortAscending: sortAscending,
),
);
//If the remote source is filtered, its the important upper limit
return lastDetails?.filteredRows ?? lastDetails?.totalRows ?? 0;
} catch (error) {
return Future.error(error);
}
}