centerOffsetAdjustment property

double centerOffsetAdjustment

For a center sliver, the distance before the absolute zero scroll offset that this sliver can cover.

For example, if an AxisDirection.down viewport with an RenderViewport.anchor of 0.5 has a single sliver with a height of 100.0 and its centerOffsetAdjustment returns 50.0, then the sliver will be centered in the viewport when the scroll offset is 0.0.

The distance here is in the opposite direction of the RenderViewport.axisDirection, so values will typically be positive.

Implementation

double get centerOffsetAdjustment => 0.0;