setFocusedIndex method

void setFocusedIndex(
  1. int index
)

Sets focus to a specific index.

Implementation

void setFocusedIndex(int index) {
  if (index >= -1 && index < _itemCount) {
    _focusedIndex = index;
    notifyListeners();
  }
}