setOffset method

bool setOffset(
  1. int offset
)

Sets an absolute viewport offset.

Implementation

bool setOffset(int offset) {
  final next = offset.clamp(0, maxOffset);
  if (next == _offset) return false;
  _offset = next;
  return true;
}