setPosition method

void setPosition(
  1. double position
)

Jump to the position in the list. position is between 0.0 (first item) and 1.0 (last item), practically currentIndex / totalCount. To jump to a specific item, use ItemScrollController.jumpTo or ItemScrollController.scrollTo.

Implementation

void setPosition(double position) {
  scrollKey.currentState?.setPosition(position, _currentFirst());
}