getPosition method
Implementation
double getPosition() {
var p = 0.0;
if (_position < 0) {
p = 0;
} else if (_position > widget.width - widget.height) {
p = widget.width - widget.height;
} else {
p = _position;
}
return p;
}