SliverGeometry constructor
Creates an object that describes the amount of space occupied by a sliver.
If the layoutExtent argument is null, layoutExtent defaults to the
paintExtent. If the hitTestExtent argument is null, hitTestExtent
defaults to the paintExtent. If visible is null, visible defaults to
whether paintExtent is greater than zero.
The other arguments must not be null.
Implementation
const SliverGeometry({
this.scrollExtent = 0.0,
this.paintExtent = 0.0,
this.paintOrigin = 0.0,
double layoutExtent,
this.maxPaintExtent = 0.0,
this.maxScrollObstructionExtent = 0.0,
double hitTestExtent,
bool visible,
this.hasVisualOverflow = false,
this.scrollOffsetCorrection,
double cacheExtent,
}) : assert(scrollExtent != null),
assert(paintExtent != null),
assert(paintOrigin != null),
assert(maxPaintExtent != null),
assert(hasVisualOverflow != null),
assert(scrollOffsetCorrection != 0.0),
layoutExtent = layoutExtent ?? paintExtent,
hitTestExtent = hitTestExtent ?? paintExtent,
cacheExtent = cacheExtent ?? layoutExtent ?? paintExtent,
visible = visible ?? paintExtent > 0.0;