applyUserOffset method

  1. @override
void applyUserOffset(
  1. double delta
)
override

Updates the scroll position by the given amount.

Appropriate for when the user is directly manipulating the scroll position, for example by dragging the scroll view. Typically applies ScrollPhysics.applyPhysicsToUserOffset and other transformations that are appropriate for user-driving scrolling.

Implementation

@override
void applyUserOffset(double delta) {
  updateUserScrollDirection(delta > 0.0 ? ScrollDirection.forward : ScrollDirection.reverse);
  setPixels(pixels - physics.applyPhysicsToUserOffset(this, delta));
}