setYOffset method

ViewportModel setYOffset(
  1. int n
)

Sets the Y offset (clamped to valid range).

Implementation

ViewportModel setYOffset(int n) {
  return copyWith(yOffset: n.clamp(0, _maxYOffset));
}