Skip to main content

RenderSliverScrollingPersistentHeader

Trait RenderSliverScrollingPersistentHeader 

Source
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§

Provided Methods§

Source

fn update_geometry(self: RenderHandle<Self>, app: &mut App) -> f64

Updates the geometry, and returns the new value for RenderSliver::child_main_axis_position.

Source

fn perform_layout(self: RenderHandle<Self>, app: &mut App)

The body of Flutter’s performLayout override.

Source

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".

Implementors§