scrollToPos method
Implementation
void scrollToPos(double offset, {bool? animate}) {
if (((animate != null && animate) || (animate == null && this.animate)) &&
animationDuration != Duration.zero) {
animateTo(
offset.clamp(0, max),
duration: animationDuration,
curve: animationCurve,
);
} else {
jumpTo(offset.clamp(0, max));
}
}