pub struct SliverGeometry {
pub scroll_extent: f64,
pub paint_origin: f64,
pub paint_extent: f64,
pub layout_extent: f64,
pub max_paint_extent: f64,
pub max_scroll_obstruction_extent: f64,
pub hit_test_extent: f64,
pub visible: bool,
pub has_visual_overflow: bool,
pub scroll_offset_correction: Option<f64>,
pub cache_extent: f64,
pub cross_axis_extent: Option<f64>,
}Expand description
The amount of space a sliver occupies.
Fields§
§scroll_extent: f64Estimated total scrollable extent this sliver has content for.
paint_origin: f64Visual location of the first visible part relative to the layout position.
paint_extent: f64Currently visible visual space taken by this sliver.
layout_extent: f64Distance from the first visible part of this sliver to the first visible part of the next.
max_paint_extent: f64Estimated total paint extent if remaining paint extent were infinite.
max_scroll_obstruction_extent: f64Maximum extent by which a pinned sliver can reduce the scrollable area.
hit_test_extent: f64Distance from where this sliver started painting to the bottom of where it should accept hits.
visible: boolWhether this sliver should be painted.
has_visual_overflow: boolWhether this sliver has visual overflow.
scroll_offset_correction: Option<f64>Non-zero asks the parent to correct the scroll offset and relayout.
cache_extent: f64Pixels consumed in the remaining cache extent.
cross_axis_extent: Option<f64>Cross-axis extent, if the sliver reports one.
Implementations§
Source§impl SliverGeometry
impl SliverGeometry
Sourcepub const ZERO: SliverGeometry
pub const ZERO: SliverGeometry
A sliver that occupies no space at all.
Sourcepub const fn builder() -> SliverGeometryBuilder
pub const fn builder() -> SliverGeometryBuilder
Starts geometry with Flutter’s constructor defaults. Extents left out are filled in by
SliverGeometryBuilder::build, as Flutter’s constructor fills them.
Sourcepub const fn copy_with(self) -> SliverGeometryBuilder
pub const fn copy_with(self) -> SliverGeometryBuilder
Dart copyWith: a builder holding this geometry’s values, for fields to be replaced.
Sourcepub fn is_zero(&self) -> bool
pub fn is_zero(&self) -> bool
Dart’s geometry == SliverGeometry.zero: whether this geometry occupies no space at
all.
Sourcepub fn debug_assert_is_valid(&self) -> bool
pub fn debug_assert_is_valid(&self) -> bool
Asserts that this geometry is internally consistent.
Does nothing if asserts are disabled. Always returns true.