setLoadNextPage method

void setLoadNextPage({
  1. int? rowsPerPage,
  2. int? firstRowIndex,
})

Implementation

void setLoadNextPage({int? rowsPerPage, int? firstRowIndex}) {
  _rows.clear();
  late final int finalFirstRowIndex;
  rowsPerPage ??= widget.rowsPerPage;
  if (widget.source.nextStartIndex != null) {
    finalFirstRowIndex = widget.source.nextStartIndex!;
    _firstRowIndex = finalFirstRowIndex;
    widget.source.nextStartIndex = null;
  } else {
    finalFirstRowIndex = _firstRowIndex;
  }

  if (remoteReloadRequired(rowsPerPage, firstRowIndex)) {
    loadNextPage = widget.source.loadNextPage(
      rowsPerPage,
      finalFirstRowIndex,
      widget.sortColumnIndex,
      sortAscending: widget.sortAscending,
    );
  }
}