Skip to main content

RenderSliverEdgeInsetsPadding

Trait RenderSliverEdgeInsetsPadding 

Source
pub trait RenderSliverEdgeInsetsPadding: RenderSliver + RenderObjectWithChildMixin<ChildType = AnyRenderSliver> {
Show 13 methods // Required method fn resolved_padding( self: RenderHandle<Self>, app: &App, ) -> Option<EdgeInsets>; // Provided methods fn before_padding(self: RenderHandle<Self>, app: &App) -> f64 { ... } fn after_padding(self: RenderHandle<Self>, app: &App) -> f64 { ... } fn main_axis_padding(self: RenderHandle<Self>, app: &App) -> f64 { ... } fn cross_axis_padding(self: RenderHandle<Self>, app: &App) -> f64 { ... } fn setup_parent_data( self: RenderHandle<Self>, app: &mut App, child: AnyRenderObject, ) { ... } fn perform_layout(self: RenderHandle<Self>, app: &mut App) { ... } 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 child_cross_axis_position( self: RenderHandle<Self>, app: &App, child: AnyRenderObject, ) -> f64 { ... } fn child_scroll_offset( self: RenderHandle<Self>, app: &App, child: AnyRenderObject, ) -> Option<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 sliver that insets another sliver by applying resolved padding on each side.

Flutter’s RenderSliverEdgeInsetsPadding: the shared bodies of a padding sliver, over the resolved_padding the implementor supplies.

Required Methods§

Source

fn resolved_padding(self: RenderHandle<Self>, app: &App) -> Option<EdgeInsets>

The amount to pad the child in each dimension.

The offsets are specified in terms of visual edges, left, top, right, and bottom. These values are not affected by the TextDirection.

Must be Some and contain no negative values when perform_layout is called.

Provided Methods§

Source

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

The padding in the scroll direction on the side nearest the 0.0 scroll direction.

Only valid after layout has started, since before layout the render object doesn’t know what direction it will be laid out in.

Source

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

The padding in the scroll direction on the side furthest from the 0.0 scroll offset.

Only valid after layout has started.

Source

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

The total padding in the crate::SliverConstraints::axis_direction. (In other words, for a vertical downwards-growing list, the sum of the padding on the top and bottom.)

Only valid after layout has started.

Source

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

The total padding in the cross-axis direction. (In other words, for a vertical downwards-growing list, the sum of the padding on the left and right.)

Only valid after layout has started.

Source

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

The body of Flutter’s setupParentData override.

Source

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

The body of Flutter’s performLayout override.

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 child_cross_axis_position( self: RenderHandle<Self>, app: &App, child: AnyRenderObject, ) -> f64

The body of Flutter’s childCrossAxisPosition override.

Source

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

The body of Flutter’s childScrollOffset 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§