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.
Trait Implementations§
Source§impl Clone for SliverGeometry
impl Clone for SliverGeometry
impl Copy for SliverGeometry
Source§impl Debug for SliverGeometry
impl Debug for SliverGeometry
Source§impl Default for SliverGeometry
impl Default for SliverGeometry
Source§fn default() -> SliverGeometry
fn default() -> SliverGeometry
Source§impl Diagnosticable for SliverGeometry
impl Diagnosticable for SliverGeometry
Source§fn to_string_short(&self) -> String
fn to_string_short(&self) -> String
Dart’s toStringShort: objectRuntimeType(this, 'SliverGeometry'), without an identity.
Source§fn debug_fill_properties(&self, properties: &mut DiagnosticPropertiesBuilder)
fn debug_fill_properties(&self, properties: &mut DiagnosticPropertiesBuilder)
Dart’s debugFillProperties.
Source§fn type_name(&self) -> &'static str
fn type_name(&self) -> &'static str
Object.runtimeType as diagnostics print it: the last segment of
the Rust type path, without generic arguments.Source§fn identity_hash(&self) -> u64
fn identity_hash(&self) -> u64
Object.hashCode as diagnostics print it: the object’s address.Source§fn to_diagnostics_node(&self) -> DiagnosticableNode
fn to_diagnostics_node(&self) -> DiagnosticableNode
DiagnosticsNode::to_string_deep.Source§fn to_diagnostics_node_with(
&self,
name: Option<String>,
style: Option<DiagnosticsTreeStyle>,
) -> DiagnosticableNode
fn to_diagnostics_node_with( &self, name: Option<String>, style: Option<DiagnosticsTreeStyle>, ) -> DiagnosticableNode
toDiagnosticsNode(name:, style:).Source§fn to_string(&self) -> String
fn to_string(&self) -> String
toString: a single-line description with properties and no
children. Read moreSource§fn to_string_at(&self, min_level: DiagnosticLevel) -> String
fn to_string_at(&self, min_level: DiagnosticLevel) -> String
toString(minLevel:).