Skip to main content

RenderConstrainedBoxBase

Trait RenderConstrainedBoxBase 

Source
pub trait RenderConstrainedBoxBase: RenderProxyBoxMixin {
    // Required methods
    fn constrained_box_data(
        self: RenderHandle<Self>,
        app: &App,
    ) -> &RenderConstrainedBoxData;
    fn constrained_box_data_mut(
        self: RenderHandle<Self>,
        app: &mut App,
    ) -> &mut RenderConstrainedBoxData;

    // Provided methods
    fn additional_constraints(
        self: RenderHandle<Self>,
        app: &App,
    ) -> BoxConstraints { ... }
    fn set_additional_constraints(
        self: RenderHandle<Self>,
        app: &mut App,
        value: BoxConstraints,
    ) { ... }
    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_dry_baseline(
        self: RenderHandle<Self>,
        app: &mut App,
        constraints: BoxConstraints,
        baseline: TextBaseline,
    ) -> Option<f64> { ... }
    fn perform_layout(self: RenderHandle<Self>, app: &mut App) { ... }
    fn compute_dry_layout(
        self: RenderHandle<Self>,
        app: &mut App,
        constraints: BoxConstraints,
    ) -> Size { ... }
}
Expand description

Flutter’s RenderConstrainedBox bodies. RenderConstrainedBox is the plain leaf; a Dart subclass (cupertino_ui’s _RenderCupertinoSlider) is a leaf that implements this trait too and overrides what Dart’s subclass overrides.

A leaf calls perform_layout, the intrinsics, compute_dry_baseline and compute_dry_layout from its RenderObject and RenderBox impls, where Dart inherits them.

Required Methods§

Source

fn constrained_box_data( self: RenderHandle<Self>, app: &App, ) -> &RenderConstrainedBoxData

Base class field access.

Source

fn constrained_box_data_mut( self: RenderHandle<Self>, app: &mut App, ) -> &mut RenderConstrainedBoxData

Provided Methods§

Source

fn additional_constraints(self: RenderHandle<Self>, app: &App) -> BoxConstraints

Additional constraints to apply to the child during layout.

Source

fn set_additional_constraints( self: RenderHandle<Self>, app: &mut App, value: BoxConstraints, )

Source

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

Flutter’s computeMinIntrinsicWidth override.

Source

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

Flutter’s computeMaxIntrinsicWidth override.

Source

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

Flutter’s computeMinIntrinsicHeight override.

Source

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

Flutter’s computeMaxIntrinsicHeight override.

Source

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

Flutter’s computeDryBaseline override.

Source

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

Flutter’s performLayout override.

Source

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

Flutter’s computeDryLayout override.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§