Skip to main content

RenderSliverSingleBoxAdapter

Trait RenderSliverSingleBoxAdapter 

Source
pub trait RenderSliverSingleBoxAdapter:
    RenderSliver
    + RenderObjectWithChildMixin<ChildType = AnyRenderBox>
    + RenderSliverHelpers {
    // Provided methods
    fn setup_parent_data(
        self: RenderHandle<Self>,
        app: &mut App,
        child: AnyRenderObject,
    ) { ... }
    fn set_child_parent_data(
        self: RenderHandle<Self>,
        app: &mut App,
        child: AnyRenderObject,
        constraints: SliverConstraints,
        geometry: SliverGeometry,
    ) { ... }
    fn hit_test_children(
        self: RenderHandle<Self>,
        app: &mut App,
        result: &mut SliverHitTestResult<'_>,
        main_axis_position: f64,
        cross_axis_position: f64,
    ) -> bool { ... }
    fn child_main_axis_position(
        self: RenderHandle<Self>,
        app: &App,
        child: AnyRenderObject,
    ) -> f64 { ... }
    fn apply_paint_transform(
        self: RenderHandle<Self>,
        app: &App,
        child: AnyRenderObject,
        transform: &mut Matrix4,
    ) { ... }
    fn paint(
        self: RenderHandle<Self>,
        app: &mut App,
        context: &mut PaintingContext,
        offset: Offset,
    ) { ... }
}
Expand description

A RenderSliver that contains a single crate::RenderBox.

See also:

Provided Methods§

Source

fn setup_parent_data( self: RenderHandle<Self>, app: &mut App, child: AnyRenderObject, )

The body of Flutter’s setupParentData override; call it from RenderObject::setup_parent_data.

Source

fn set_child_parent_data( self: RenderHandle<Self>, app: &mut App, child: AnyRenderObject, constraints: SliverConstraints, geometry: SliverGeometry, )

Sets the SliverPhysicalParentData::paint_offset for the given child according to the SliverConstraints::axis_direction and SliverConstraints::growth_direction and the given geometry.

Source

fn hit_test_children( self: RenderHandle<Self>, app: &mut App, result: &mut SliverHitTestResult<'_>, main_axis_position: f64, cross_axis_position: f64, ) -> bool

The body of Flutter’s hitTestChildren override.

Source

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

The body of Flutter’s childMainAxisPosition override.

Source

fn apply_paint_transform( self: RenderHandle<Self>, app: &App, child: AnyRenderObject, transform: &mut Matrix4, )

The body of Flutter’s applyPaintTransform override.

Source

fn paint( self: RenderHandle<Self>, app: &mut App, context: &mut PaintingContext, offset: Offset, )

The body of Flutter’s paint override.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§