getPosition method

double getPosition()

clamp the animated button position between 0 and the cancel threshold

Implementation

double getPosition() {
  if (_position < 0) {
    return 0;
  } else if (_position > cancelPosition - _height) {
    return cancelPosition - _height;
  }
  return _position;
}