scrollToPos method

void scrollToPos(
  1. double offset, {
  2. bool? animate,
})

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));
  }
}