jumpTo method
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, itsjumpTo
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);
}
}