toggleAt method

bool toggleAt(
  1. int rowIndex
)

Toggles the selection state of the row at rowIndex.

Returns the new selection value.

Implementation

bool toggleAt(int rowIndex) {
  final selected = !isSelectedAt(rowIndex);
  setSelectedAt(rowIndex, selected);
  return selected;
}