Skip to main content

RenderSliverPinnedPersistentHeader

Trait RenderSliverPinnedPersistentHeader 

Source
pub trait RenderSliverPinnedPersistentHeader: RenderSliverPersistentHeader {
    // Required methods
    fn pinned_data(
        self: RenderHandle<Self>,
        app: &App,
    ) -> &RenderSliverPinnedPersistentHeaderData;
    fn pinned_data_mut(
        self: RenderHandle<Self>,
        app: &mut App,
    ) -> &mut RenderSliverPinnedPersistentHeaderData;

    // Provided methods
    fn perform_layout(self: RenderHandle<Self>, app: &mut App) { ... }
    fn child_main_axis_position(
        self: RenderHandle<Self>,
        _app: &App,
        _child: AnyRenderObject,
    ) -> f64 { ... }
    fn show_on_screen(
        self: RenderHandle<Self>,
        app: &mut App,
        descendant: Option<AnyRenderObject>,
        rect: Option<Rect>,
        duration: Duration,
        curve: Rc<dyn Curve>,
    ) { ... }
}
Expand description

A sliver with a box child which never scrolls off the viewport in the positive scroll direction, and which first scrolls on at a full size but then shrinks as the viewport continues to scroll.

This sliver avoids overlapping other earlier slivers where possible.

Required Methods§

Provided Methods§

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.

Source

fn show_on_screen( self: RenderHandle<Self>, app: &mut App, descendant: Option<AnyRenderObject>, rect: Option<Rect>, duration: Duration, curve: Rc<dyn Curve>, )

The body of Flutter’s showOnScreen override.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§