SliverGeometry class

Describes the amount of space occupied by a RenderSliver.

A sliver can occupy space in several different ways, which is why this class contains multiple values.

Mixed-in types
Annotations

Constructors

SliverGeometry({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.
const

Properties

cacheExtent double
How many pixels the sliver has consumed in the SliverConstraints.remainingCacheExtent.
final
crossAxisExtent double?
The amount of space allocated to the cross axis.
final
hashCode int
The hash code for this object.
no setterinherited
hasVisualOverflow bool
Whether this sliver has visual overflow.
final
hitTestExtent double
The distance from where this sliver started painting to the bottom of where it should accept hits.
final
layoutExtent double
The distance from the first visible part of this sliver to the first visible part of the next sliver, assuming the next sliver's SliverConstraints.scrollOffset is zero.
final
maxPaintExtent double
The (estimated) total paint extent that this sliver would be able to provide if the SliverConstraints.remainingPaintExtent was infinite.
final
maxScrollObstructionExtent double
The maximum extent by which this sliver can reduce the area in which content can scroll if the sliver were pinned at the edge.
final
paintExtent double
The amount of currently visible visual space that was taken by the sliver to render the subset of the sliver that covers all or part of the SliverConstraints.remainingPaintExtent in the current viewport.
final
paintOrigin double
The visual location of the first visible part of this sliver relative to its layout position.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollExtent double
The (estimated) total scrollable extent that this sliver has content for.
final
scrollOffsetCorrection double?
If this is non-zero after RenderSliver.performLayout returns, the scroll offset will be adjusted by the parent and then the entire layout of the parent will be rerun.
final
visible bool
Whether this sliver should be painted.
final

Methods

copyWith({double? scrollExtent, double? paintExtent, double? paintOrigin, double? layoutExtent, double? maxPaintExtent, double? maxScrollObstructionExtent, double? crossAxisExtent, double? hitTestExtent, bool? visible, bool? hasVisualOverflow, double? cacheExtent}) SliverGeometry
Creates a copy of this object but with the given fields replaced with the new values.
debugAssertIsValid({InformationCollector? informationCollector}) bool
Asserts that this geometry is internally consistent.
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

zero → const SliverGeometry
A sliver that occupies no space at all.