offset property

ViewportOffset 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.

Must not be null.

Implementation

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

Implementation

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