pageTo method

void pageTo(
  1. int rowIndex
)

Ensures that the given row is visible.

Implementation

void pageTo(int rowIndex) {
  final oldFirstRowIndex = _firstRowIndex;
  setState(() {
    final rowsPerPage = widget.rowsPerPage;
    _firstRowIndex = (rowIndex ~/ rowsPerPage) * rowsPerPage;
    setLoadNextPage();
  });
  if ((widget.onPageChanged != null) &&
      (oldFirstRowIndex != _firstRowIndex)) {
    widget.onPageChanged!(_firstRowIndex);
  }
}