scrollOffset property

double scrollOffset

The scroll offset, in this sliver's coordinate system, that corresponds to the earliest visible part of this sliver in the AxisDirection.

For example, if AxisDirection is AxisDirection.down, then this is the scroll offset at the top of the visible portion of the sliver or equivalently the amount the top of the sliver has been scrolled past the top of the viewport.

This value is typically used to compute whether this sliver should still protrude into the viewport via SliverGeometry.paintExtent and SliverGeometry.layoutExtent considering how far the beginning of the sliver is above the beginning of the viewport.

For slivers whose top is not past the top of the viewport, the scrollOffset is 0 when AxisDirection is AxisDirection.down. This includes all the slivers that are below the bottom of the viewport.

SliverConstraints.remainingPaintExtent is typically used to accomplish the same goal of computing whether scrolled out slivers should still partially 'protrude in' from the bottom of the viewport.

Whether this corresponds to the beginning or the end of the sliver's contents depends on the growthDirection.


final double scrollOffset