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 new() -> SliverGeometry
pub const fn new() -> SliverGeometry
Creates geometry with Flutter’s constructor defaults.
Sourcepub const fn scroll_extent(self, value: f64) -> SliverGeometry
pub const fn scroll_extent(self, value: f64) -> SliverGeometry
Sets scroll_extent.
Sourcepub const fn paint_origin(self, value: f64) -> SliverGeometry
pub const fn paint_origin(self, value: f64) -> SliverGeometry
Sets paint_origin.
Sourcepub const fn paint_extent(self, value: f64) -> SliverGeometry
pub const fn paint_extent(self, value: f64) -> SliverGeometry
Sets paint_extent. Also fills layout, hit-test,
cache, and visible the way Flutter’s constructor does when those
arguments are omitted.
Sourcepub const fn layout_extent(self, value: f64) -> SliverGeometry
pub const fn layout_extent(self, value: f64) -> SliverGeometry
Sets layout_extent.
Sourcepub const fn max_paint_extent(self, value: f64) -> SliverGeometry
pub const fn max_paint_extent(self, value: f64) -> SliverGeometry
Sets max_paint_extent.
Sourcepub const fn max_scroll_obstruction_extent(self, value: f64) -> SliverGeometry
pub const fn max_scroll_obstruction_extent(self, value: f64) -> SliverGeometry
Sourcepub const fn hit_test_extent(self, value: f64) -> SliverGeometry
pub const fn hit_test_extent(self, value: f64) -> SliverGeometry
Sets hit_test_extent.
Sourcepub const fn visible(self, value: bool) -> SliverGeometry
pub const fn visible(self, value: bool) -> SliverGeometry
Sets visible.
Sourcepub const fn has_visual_overflow(self, value: bool) -> SliverGeometry
pub const fn has_visual_overflow(self, value: bool) -> SliverGeometry
Sets has_visual_overflow.
Sourcepub fn scroll_offset_correction(self, value: f64) -> SliverGeometry
pub fn scroll_offset_correction(self, value: f64) -> SliverGeometry
Sets scroll_offset_correction.
Sourcepub const fn cache_extent(self, value: f64) -> SliverGeometry
pub const fn cache_extent(self, value: f64) -> SliverGeometry
Sets cache_extent.
Sourcepub const fn cross_axis_extent(self, value: f64) -> SliverGeometry
pub const fn cross_axis_extent(self, value: f64) -> SliverGeometry
Sets cross_axis_extent.
Sourcepub const fn copy_with(self) -> SliverGeometry
pub const fn copy_with(self) -> SliverGeometry
Creates a copy of this object. Chain field replacements.
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.
Trait Implementations§
Source§impl Clone for SliverGeometry
impl Clone for SliverGeometry
Source§fn clone(&self) -> SliverGeometry
fn clone(&self) -> SliverGeometry
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more