jumpTo method

void jumpTo({
  1. required double value,
})

Jumps to a specific scroll position.

  • value: The target scroll position in pixels.

  • If no ScrollController is assigned, the scroll position of the parent scrollable widget is updated.

  • If a ScrollController is assigned, its jumpTo method is used to update the scroll position.

Implementation

void jumpTo({required double value}) {
  if (isScrollOutside == true) {
    Scrollable.maybeOf(_context)?.position.moveTo(value);
  } else {
    _scrollController?.jumpTo(value);
  }
}