DataGridController constructor Null safety

DataGridController(
  1. {int selectedIndex = -1,
  2. DataGridRow? selectedRow,
  3. List<DataGridRow> selectedRows = const <DataGridRow>[]}
)

Creates the DataGridController with the selectedIndex, selectedRow and selectedRows.

Implementation

DataGridController(
    {int selectedIndex = -1,
    DataGridRow? selectedRow,
    List<DataGridRow> selectedRows = const <DataGridRow>[]})
    : _selectedRow = selectedRow,
      _selectedIndex = selectedIndex,
      _selectedRows = selectedRows.toList() {
  _currentCell = RowColumnIndex(-1, -1);
  _horizontalOffset = 0.0;
  _verticalOffset = 0.0;
}