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