updateOutOfBandData method Null safety
- GrowthDirection growthDirection,
- 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) {
switch (growthDirection) {
case GrowthDirection.forward:
_maxScrollExtent += childLayoutGeometry.scrollExtent;
break;
case GrowthDirection.reverse:
_minScrollExtent -= childLayoutGeometry.scrollExtent;
break;
}
if (childLayoutGeometry.hasVisualOverflow) {
_hasVisualOverflow = true;
}
}