pageTo method

void pageTo (int rowIndex)

Ensures that the given row is visible.

Implementation

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