SliverGeometry constructor
- double scrollExtent = 0.0,
- double paintExtent = 0.0,
- double paintOrigin = 0.0,
- double? layoutExtent,
- double maxPaintExtent = 0.0,
- double maxScrollObstructionExtent = 0.0,
- double? crossAxisExtent,
- double? hitTestExtent,
- bool? visible,
- bool hasVisualOverflow = false,
- double? scrollOffsetCorrection,
- double? cacheExtent,
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.
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,
this.crossAxisExtent,
double? hitTestExtent,
bool? visible,
this.hasVisualOverflow = false,
this.scrollOffsetCorrection,
double? cacheExtent,
}) : assert(scrollOffsetCorrection != 0.0),
layoutExtent = layoutExtent ?? paintExtent,
hitTestExtent = hitTestExtent ?? paintExtent,
cacheExtent = cacheExtent ?? layoutExtent ?? paintExtent,
visible = visible ?? paintExtent > 0.0;