moveBy method

void moveBy(
  1. int delta
)

Moves focus by delta positions with wrapping.

Positive delta moves forward, negative moves backward. Wraps around at list boundaries.

Implementation

void moveBy(int delta) {
  if (_itemCount == 0) return;
  _focusedIndex = (_focusedIndex + delta + _itemCount) % _itemCount;
}