anchor property Null safety

double anchor

The relative position of the zero scroll offset.

For example, if anchor is 0.5 and the axisDirection is AxisDirection.down or AxisDirection.up, then the zero scroll offset is vertically centered within the viewport. If the anchor is 1.0, and the axisDirection is AxisDirection.right, then the zero scroll offset is on the left edge of the viewport.

Implementation

double get anchor => _anchor;
void anchor=(double value)

Implementation

set anchor(double value) {
  assert(value != null);
  assert(value >= 0.0 && value <= 1.0);
  if (value == _anchor)
    return;
  _anchor = value;
  markNeedsLayout();
}