manualHandleScroll method

void manualHandleScroll(
  1. double delta,
  2. bool callIsVertical
)

Implementation

void manualHandleScroll(double delta, bool callIsVertical) {
  if (isAlive == false) {
    return;
  }
  if ((currentScrollPhysics is NeverScrollableScrollPhysics) == false &&
      callIsVertical == isVertical) {
    //print(delta);
    if (delta.isNegative == _isInnerScrollNegative) {
      futurePosition = min(max(0, futurePosition + delta),
          clientController.position.maxScrollExtent);
    } else {
      _isInnerScrollNegative = delta.isNegative;
      futurePosition = min(max(0, clientController.offset + delta),
          clientController.position.maxScrollExtent);
    }

    //decelerationManualHandleScroll(delta);
    final Duration duration = Duration(
        milliseconds:
            min(800, max(250, ((delta.abs() / 150) * 250).toInt())));
    clientController.animateTo(
      futurePosition,
      duration: duration,
      curve: Curves.easeOutQuad,
    );
  } else {
    if (parentSilkyScrollState != null) {
      parentSilkyScrollState!.manualHandleScroll(delta, callIsVertical);
    }
  }
}