Skip to main content

RenderSliverFloatingPersistentHeader

Trait RenderSliverFloatingPersistentHeader 

Source
pub trait RenderSliverFloatingPersistentHeader: RenderSliverPersistentHeader {
Show 19 methods // Required methods fn floating_data( self: RenderHandle<Self>, app: &App, ) -> &RenderSliverFloatingPersistentHeaderData; fn floating_data_mut( self: RenderHandle<Self>, app: &mut App, ) -> &mut RenderSliverFloatingPersistentHeaderData; // Provided methods fn did_detach(self: RenderHandle<Self>, app: &mut App) { ... } fn vsync(self: RenderHandle<Self>, app: &App) -> Option<TickerProviderRef> { ... } fn set_vsync( self: RenderHandle<Self>, app: &mut App, value: Option<TickerProviderRef>, ) { ... } fn snap_configuration( self: RenderHandle<Self>, app: &App, ) -> Option<FloatingHeaderSnapConfiguration> { ... } fn set_snap_configuration( self: RenderHandle<Self>, app: &mut App, value: Option<FloatingHeaderSnapConfiguration>, ) { ... } fn show_on_screen_configuration( self: RenderHandle<Self>, app: &App, ) -> Option<PersistentHeaderShowOnScreenConfiguration> { ... } fn set_show_on_screen_configuration( self: RenderHandle<Self>, app: &mut App, value: Option<PersistentHeaderShowOnScreenConfiguration>, ) { ... } fn effective_scroll_offset( self: RenderHandle<Self>, app: &App, ) -> Option<f64> { ... } fn update_geometry(self: RenderHandle<Self>, app: &mut App) -> f64 { ... } fn update_animation( self: RenderHandle<Self>, app: &mut App, duration: Duration, end_value: f64, curve: Rc<dyn Curve>, ) { ... } fn update_scroll_start_direction( self: RenderHandle<Self>, app: &mut App, direction: ScrollDirection, ) { ... } fn maybe_start_snap_animation( self: RenderHandle<Self>, app: &mut App, direction: ScrollDirection, ) { ... } fn maybe_stop_snap_animation( self: RenderHandle<Self>, app: &mut App, _direction: ScrollDirection, ) { ... } fn perform_layout(self: RenderHandle<Self>, app: &mut App) { ... } fn show_on_screen( self: RenderHandle<Self>, app: &mut App, descendant: Option<AnyRenderObject>, rect: Option<Rect>, duration: Duration, curve: Rc<dyn Curve>, ) { ... } fn child_main_axis_position( self: RenderHandle<Self>, app: &App, child: AnyRenderObject, ) -> f64 { ... } fn as_floating_persistent_header( self: RenderHandle<Self>, ) -> AnyRenderSliverFloatingPersistentHeader { ... }
}
Expand description

A sliver with a box child which shrinks and scrolls like a RenderSliverScrollingPersistentHeader, but immediately comes back when the user scrolls in the reverse direction.

See also:

Required Methods§

Provided Methods§

Source

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

The body of Flutter’s detach override: disposes the snap animation controller, which is lazily recreated if we are reattached.

Source

fn vsync(self: RenderHandle<Self>, app: &App) -> Option<TickerProviderRef>

A TickerProvider to use when animating the scroll position.

Source

fn set_vsync( self: RenderHandle<Self>, app: &mut App, value: Option<TickerProviderRef>, )

Sets vsync.

Source

fn snap_configuration( self: RenderHandle<Self>, app: &App, ) -> Option<FloatingHeaderSnapConfiguration>

Defines the parameters used to snap (animate) the floating header in and out of view.

Source

fn set_snap_configuration( self: RenderHandle<Self>, app: &mut App, value: Option<FloatingHeaderSnapConfiguration>, )

Source

fn show_on_screen_configuration( self: RenderHandle<Self>, app: &App, ) -> Option<PersistentHeaderShowOnScreenConfiguration>

Specifies the persistent header’s behavior when show_on_screen is called.

Source

fn set_show_on_screen_configuration( self: RenderHandle<Self>, app: &mut App, value: Option<PersistentHeaderShowOnScreenConfiguration>, )

Source

fn effective_scroll_offset(self: RenderHandle<Self>, app: &App) -> Option<f64>

Flutter’s _effectiveScrollOffset, the offset the header is laid out at.

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 update_animation( self: RenderHandle<Self>, app: &mut App, duration: Duration, end_value: f64, curve: Rc<dyn Curve>, )

Flutter’s _updateAnimation.

Source

fn update_scroll_start_direction( self: RenderHandle<Self>, app: &mut App, direction: ScrollDirection, )

Update the last known scroll direction when scrolling began.

Source

fn maybe_start_snap_animation( self: RenderHandle<Self>, app: &mut App, direction: ScrollDirection, )

If the header isn’t already fully exposed, then scroll it into view.

Source

fn maybe_stop_snap_animation( self: RenderHandle<Self>, app: &mut App, _direction: ScrollDirection, )

If a header snap animation or a show_on_screen expand animation is underway then stop it.

Source

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

The body of Flutter’s performLayout 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.

Source

fn child_main_axis_position( self: RenderHandle<Self>, app: &App, child: AnyRenderObject, ) -> f64

The body of Flutter’s childMainAxisPosition override.

Source

fn as_floating_persistent_header( self: RenderHandle<Self>, ) -> AnyRenderSliverFloatingPersistentHeader

The type-erased RenderSliverFloatingPersistentHeader handle. Free: the vtable is a const, and the id is copied.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§