Skip to main content

RenderListBodyMixin

Trait RenderListBodyMixin 

Source
pub trait RenderListBodyMixin:
    RenderBox
    + ContainerRenderObjectMixin<ChildType = AnyRenderBox, ParentDataType = ListBodyParentData>
    + RenderBoxContainerDefaultsMixin {
Show 20 methods // Required methods fn list_body_data( self: RenderHandle<Self>, app: &App, ) -> &RenderListBodyData; fn list_body_data_mut( self: RenderHandle<Self>, app: &mut App, ) -> &mut RenderListBodyData; // Provided methods fn setup_parent_data( self: RenderHandle<Self>, app: &mut App, child: AnyRenderObject, ) { ... } fn debug_fill_properties( self: RenderHandle<Self>, app: &App, properties: &mut DiagnosticPropertiesBuilder, ) { ... } fn axis_direction(self: RenderHandle<Self>, app: &App) -> AxisDirection { ... } fn set_axis_direction( self: RenderHandle<Self>, app: &mut App, value: AxisDirection, ) { ... } fn main_axis(self: RenderHandle<Self>, app: &App) -> Axis { ... } fn compute_dry_baseline( self: RenderHandle<Self>, app: &mut App, constraints: BoxConstraints, baseline: TextBaseline, ) -> Option<f64> { ... } fn compute_dry_layout( self: RenderHandle<Self>, app: &mut App, constraints: BoxConstraints, ) -> Size { ... } fn debug_check_constraints( self: RenderHandle<Self>, app: &App, constraints: BoxConstraints, ) -> bool { ... } fn perform_layout(self: RenderHandle<Self>, app: &mut App) { ... } fn get_intrinsic_cross_axis( self: RenderHandle<Self>, app: &mut App, child_size: impl Fn(&mut App, AnyRenderBox) -> f64, ) -> f64 { ... } fn get_intrinsic_main_axis( self: RenderHandle<Self>, app: &mut App, child_size: impl Fn(&mut App, AnyRenderBox) -> f64, ) -> f64 { ... } fn compute_min_intrinsic_width( self: RenderHandle<Self>, app: &mut App, height: f64, ) -> f64 { ... } fn compute_max_intrinsic_width( self: RenderHandle<Self>, app: &mut App, height: f64, ) -> f64 { ... } fn compute_min_intrinsic_height( self: RenderHandle<Self>, app: &mut App, width: f64, ) -> f64 { ... } fn compute_max_intrinsic_height( self: RenderHandle<Self>, app: &mut App, width: f64, ) -> f64 { ... } fn compute_distance_to_actual_baseline( self: RenderHandle<Self>, app: &mut App, baseline: TextBaseline, ) -> Option<f64> { ... } fn paint( self: RenderHandle<Self>, app: &mut App, context: &mut PaintingContext, offset: Offset, ) { ... } fn hit_test_children( self: RenderHandle<Self>, app: &mut App, result: &mut BoxHitTestResult<'_>, position: Offset, ) -> bool { ... }
}
Expand description

Displays its children sequentially along a given axis, forcing them to the dimensions of the parent in the other axis.

Flutter’s RenderListBody: the shared bodies of the list body layout. A leaf holds a RenderListBodyData, implements this trait, and calls these where Dart would run the inherited method: RenderListBodyMixin::perform_layout(self, app).

See RenderListBody for the layout algorithm.

Required Methods§

Source

fn list_body_data(self: RenderHandle<Self>, app: &App) -> &RenderListBodyData

Mixin field access.

Source

fn list_body_data_mut( self: RenderHandle<Self>, app: &mut App, ) -> &mut RenderListBodyData

Provided Methods§

Source

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

Dart’s RenderListBody.setupParentData.

Source

fn debug_fill_properties( self: RenderHandle<Self>, app: &App, properties: &mut DiagnosticPropertiesBuilder, )

Dart’s RenderListBody.debugFillProperties, which a subclass of RenderListBody reaches through its super call.

Source

fn axis_direction(self: RenderHandle<Self>, app: &App) -> AxisDirection

The direction in which the children are laid out.

For example, if the axis_direction is AxisDirection::Down, each child will be laid out below the next, vertically.

Source

fn set_axis_direction( self: RenderHandle<Self>, app: &mut App, value: AxisDirection, )

Source

fn main_axis(self: RenderHandle<Self>, app: &App) -> Axis

The axis (horizontal or vertical) corresponding to the current axis_direction.

Source

fn compute_dry_baseline( self: RenderHandle<Self>, app: &mut App, constraints: BoxConstraints, baseline: TextBaseline, ) -> Option<f64>

Dart’s RenderListBody.computeDryBaseline.

Source

fn compute_dry_layout( self: RenderHandle<Self>, app: &mut App, constraints: BoxConstraints, ) -> Size

Dart’s RenderListBody.computeDryLayout.

Source

fn debug_check_constraints( self: RenderHandle<Self>, app: &App, constraints: BoxConstraints, ) -> bool

Flutter’s _debugCheckConstraints: panics unless the main axis is unbounded and the cross axis bounded. Internal to the list body layout.

Source

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

Dart’s RenderListBody.performLayout.

Source

fn get_intrinsic_cross_axis( self: RenderHandle<Self>, app: &mut App, child_size: impl Fn(&mut App, AnyRenderBox) -> f64, ) -> f64

Flutter’s _getIntrinsicCrossAxis: the largest of the children’s sizes. Internal to the list body layout.

Source

fn get_intrinsic_main_axis( self: RenderHandle<Self>, app: &mut App, child_size: impl Fn(&mut App, AnyRenderBox) -> f64, ) -> f64

Flutter’s _getIntrinsicMainAxis: the sum of the children’s sizes. Internal to the list body layout.

Source

fn compute_min_intrinsic_width( self: RenderHandle<Self>, app: &mut App, height: f64, ) -> f64

Dart’s RenderListBody.computeMinIntrinsicWidth.

Source

fn compute_max_intrinsic_width( self: RenderHandle<Self>, app: &mut App, height: f64, ) -> f64

Dart’s RenderListBody.computeMaxIntrinsicWidth.

Source

fn compute_min_intrinsic_height( self: RenderHandle<Self>, app: &mut App, width: f64, ) -> f64

Dart’s RenderListBody.computeMinIntrinsicHeight.

Source

fn compute_max_intrinsic_height( self: RenderHandle<Self>, app: &mut App, width: f64, ) -> f64

Dart’s RenderListBody.computeMaxIntrinsicHeight.

Source

fn compute_distance_to_actual_baseline( self: RenderHandle<Self>, app: &mut App, baseline: TextBaseline, ) -> Option<f64>

Dart’s RenderListBody.computeDistanceToActualBaseline.

Source

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

Dart’s RenderListBody.paint.

Source

fn hit_test_children( self: RenderHandle<Self>, app: &mut App, result: &mut BoxHitTestResult<'_>, position: Offset, ) -> bool

Dart’s RenderListBody.hitTestChildren.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§