onVerticalDragUpdate method

void onVerticalDragUpdate(
  1. dynamic details
)

Implementation

void onVerticalDragUpdate(details) {
  isMovingVertical.value = true;
  isMoving.value = true;
  dyOffsetVerticalUpdate.value += details.delta.dy;
  // verticalScale.value += ( - details.delta.dy.abs() *0.1 );
  roundedContainerVal.value = dyOffsetVerticalUpdate.value;

  if (dyOffsetVerticalUpdate.value < lockValue) {
    dyOffsetVerticalUpdate.value = lockValue.toDouble();
    roundedContainerVal.value = lockValue.toDouble();

    isReachedLock.value = true;
    startColorAnimation();
    stopShackleAnimation();
    _forwardRoundedContainerAnimation();
  }
  if (dyOffsetVerticalUpdate.value >= 0) {
    dyOffsetVerticalUpdate.value = 0;
  }
  // _onVerticalEndEndRoundedContainer(dyOffsetVerticalUpdate.value , false);
  shackleLock.value =
      (dyOffsetVerticalUpdate.value.abs() / roundedContainerHight) *
          ((roundedContainerWidth * 0.4) * 0.5);

  verticalScale.value = recordButtonScale -
      (dyOffsetVerticalUpdate.value.abs() * 3.5 / roundedContainerHight)
          .clamp(0.1, recordButtonScale);

  arrowOpacity.value = 1.0 -
      (dyOffsetVerticalUpdate.value.abs() *
              recordButtonScale /
              roundedContainerHight)
          .clamp(0.0, 1.0);
  // if( verticalScale.value < 0.3){
  //   verticalScale.value = 0.3;
  // }
  initialOffset = Offset(0, dyOffsetVerticalUpdate.value);
}