reset method

void reset({
  1. int initialIndex = 0,
})

Resets navigation to initial state.

Implementation

void reset({int initialIndex = 0}) {
  if (_itemCount == 0) {
    _focusedIndex = 0;
  } else {
    _focusedIndex = initialIndex.clamp(0, _itemCount - 1);
  }
}