jumpToItem method

void jumpToItem (int itemIndex)

Changes which item index is centered in the controlled scroll view.

Jumps the item index position from its current value to the given value, without animation, and without checking if the new value is in range.

Implementation

void jumpToItem(int itemIndex) {
  for (_FixedExtentScrollPosition position in positions) {
    position.jumpTo(itemIndex * position.itemExtent);
  }
}