getVisibleRowStartIndex method

int? getVisibleRowStartIndex(
  1. RowRegion rowRegion
)

Retrieves the start index of visible row based on the specified row region.

Returns null if there are no rows available in the given region.

Implementation

int? getVisibleRowStartIndex(RowRegion rowRegion) {
  if (_dataGridStateDetails != null) {
    final DataGridConfiguration dataGridConfiguration =
        _dataGridStateDetails!();
    final ScrollAxisRegion scrollAxisRegion = _getScrollAxisRegion(rowRegion);
    return dataGridConfiguration.container.scrollRows
        .getVisibleLinesRange(scrollAxisRegion)
        ?.start;
  }
  return null;
}