pub trait RenderSliverScrollingPersistentHeader: RenderSliverPersistentHeader {
// Required methods
fn scrolling_data(
self: RenderHandle<Self>,
app: &App,
) -> &RenderSliverScrollingPersistentHeaderData;
fn scrolling_data_mut(
self: RenderHandle<Self>,
app: &mut App,
) -> &mut RenderSliverScrollingPersistentHeaderData;
// Provided methods
fn update_geometry(self: RenderHandle<Self>, app: &mut App) -> f64 { ... }
fn perform_layout(self: RenderHandle<Self>, app: &mut App) { ... }
fn child_main_axis_position(
self: RenderHandle<Self>,
app: &App,
child: AnyRenderObject,
) -> f64 { ... }
}Expand description
A sliver with a box child which scrolls normally, except that when it hits the leading edge (typically the top) of the viewport, it shrinks to a minimum size before continuing to scroll.
This sliver makes no effort to avoid overlapping other content.
Required Methods§
Sourcefn scrolling_data(
self: RenderHandle<Self>,
app: &App,
) -> &RenderSliverScrollingPersistentHeaderData
fn scrolling_data( self: RenderHandle<Self>, app: &App, ) -> &RenderSliverScrollingPersistentHeaderData
Mixin field access.
Sourcefn scrolling_data_mut(
self: RenderHandle<Self>,
app: &mut App,
) -> &mut RenderSliverScrollingPersistentHeaderData
fn scrolling_data_mut( self: RenderHandle<Self>, app: &mut App, ) -> &mut RenderSliverScrollingPersistentHeaderData
See scrolling_data.
Provided Methods§
Sourcefn update_geometry(self: RenderHandle<Self>, app: &mut App) -> f64
fn update_geometry(self: RenderHandle<Self>, app: &mut App) -> f64
Updates the geometry, and returns the new value for
RenderSliver::child_main_axis_position.
Sourcefn perform_layout(self: RenderHandle<Self>, app: &mut App)
fn perform_layout(self: RenderHandle<Self>, app: &mut App)
The body of Flutter’s performLayout override.
Sourcefn child_main_axis_position(
self: RenderHandle<Self>,
app: &App,
child: AnyRenderObject,
) -> f64
fn child_main_axis_position( self: RenderHandle<Self>, app: &App, child: AnyRenderObject, ) -> f64
The body of Flutter’s childMainAxisPosition override.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".