updateOutOfBandData method Null safety

  1. @override
void updateOutOfBandData(
  1. GrowthDirection growthDirection,
  2. SliverGeometry childLayoutGeometry
)
override

Called during layoutChildSequence for each child.

Typically used by subclasses to update any out-of-band data, such as the max scroll extent, for each child.

Implementation

@override
void updateOutOfBandData(GrowthDirection growthDirection, SliverGeometry childLayoutGeometry) {
  assert(growthDirection == GrowthDirection.forward);
  _maxScrollExtent += childLayoutGeometry.scrollExtent;
  if (childLayoutGeometry.hasVisualOverflow) {
    _hasVisualOverflow = true;
  }
  _shrinkWrapExtent += childLayoutGeometry.maxPaintExtent;
}