updateHorizontalDrag method

void updateHorizontalDrag(
  1. double xValue
)

Implementation

void updateHorizontalDrag(double xValue) {
  _hDrag += xValue - _hDragStart;
  _hDragStart = xValue;
  if (_hDrag > _minXOffset) {
    _hDrag = _minXOffset;
  } else if (_hDrag < _maxXOffset) {
    _hDrag = _maxXOffset;
  }
  x = _hDrag;
}