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,
    );
  }
}