offset property

ViewportOffset get offset

The associated ViewportOffset object for the viewport describing the part of the content inside that's visible.

The ViewportOffset.pixels value determines the scroll offset that the viewport uses to select which part of its content to display. As the user scrolls the viewport, this value changes, which changes the content that is displayed.

Implementation

ViewportOffset get offset => _offset;
set offset (ViewportOffset value)

Implementation

set offset(ViewportOffset value) {
  if (value == _offset) {
    return;
  }
  if (attached) {
    _offset.removeListener(_hasScrolled);
  }
  _offset = value;
  if (attached) {
    _offset.addListener(_hasScrolled);
  }
  markNeedsLayout();
}