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:
RenderSliverToBoxAdapter, which implements this trait to size the child according to its preferred size.
Provided Methods§
Sourcefn setup_parent_data(
self: RenderHandle<Self>,
app: &mut App,
child: AnyRenderObject,
)
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.
Sourcefn set_child_parent_data(
self: RenderHandle<Self>,
app: &mut App,
child: AnyRenderObject,
constraints: SliverConstraints,
geometry: SliverGeometry,
)
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.
Sourcefn hit_test_children(
self: RenderHandle<Self>,
app: &mut App,
result: &mut SliverHitTestResult<'_>,
main_axis_position: f64,
cross_axis_position: f64,
) -> bool
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.
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.
Sourcefn apply_paint_transform(
self: RenderHandle<Self>,
app: &App,
child: AnyRenderObject,
transform: &mut Matrix4,
)
fn apply_paint_transform( self: RenderHandle<Self>, app: &App, child: AnyRenderObject, transform: &mut Matrix4, )
The body of Flutter’s applyPaintTransform override.
Sourcefn paint(
self: RenderHandle<Self>,
app: &mut App,
context: &mut PaintingContext,
offset: Offset,
)
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".