updateIndex method

void updateIndex(
  1. int n
)

Implementation

void updateIndex(int n) {
  selectedIndex = n;
  updateState();
}