select method

void select(
  1. int index
)

Implementation

void select(int index) {
  if (index >= itemCount || index < 0) {
    throw ArgumentError("Index $index is out of bounds [0; $itemCount)");
  }

  _selectedIndex = index;
  notifyListeners();
}