Skip to main content

RenderObjectWithChildMixin

Trait RenderObjectWithChildMixin 

Source
pub trait RenderObjectWithChildMixin: RenderObject {
    type ChildType: ErasedRenderObject;

    // Required methods
    fn child_data(
        self: RenderHandle<Self>,
        app: &App,
    ) -> &RenderObjectWithChildData<Self::ChildType>;
    fn child_data_mut(
        self: RenderHandle<Self>,
        app: &mut App,
    ) -> &mut RenderObjectWithChildData<Self::ChildType>;

    // Provided methods
    fn child(self: RenderHandle<Self>, app: &App) -> Option<Self::ChildType> { ... }
    fn set_child(
        self: RenderHandle<Self>,
        app: &mut App,
        value: Option<Self::ChildType>,
    ) { ... }
}
Expand description

A render object with a single child.

Flutter’s RenderObjectWithChildMixin. The child slot lives in a RenderObjectWithChildData field.

Required Associated Types§

Source

type ChildType: ErasedRenderObject

Flutter’s ChildType: the protocol of this render object’s child.

Required Methods§

Source

fn child_data( self: RenderHandle<Self>, app: &App, ) -> &RenderObjectWithChildData<Self::ChildType>

Mixin field access.

Source

fn child_data_mut( self: RenderHandle<Self>, app: &mut App, ) -> &mut RenderObjectWithChildData<Self::ChildType>

Provided Methods§

Source

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

The render object’s unique child.

Source

fn set_child( self: RenderHandle<Self>, app: &mut App, value: Option<Self::ChildType>, )

Sets the unique child, adopting or dropping as Flutter’s setter does.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl RenderObjectWithChildMixin for RenderAbsorbPointer

Source§

impl RenderObjectWithChildMixin for RenderAnimatedOpacity

Source§

impl RenderObjectWithChildMixin for RenderAnimatedSize

Source§

impl RenderObjectWithChildMixin for RenderAspectRatio

Source§

impl RenderObjectWithChildMixin for RenderBackdropFilter

Source§

impl RenderObjectWithChildMixin for RenderBaseline

Source§

impl RenderObjectWithChildMixin for RenderClipOval

Source§

impl RenderObjectWithChildMixin for RenderClipPath

Source§

impl RenderObjectWithChildMixin for RenderClipRRect

Source§

impl RenderObjectWithChildMixin for RenderClipRSuperellipse

Source§

impl RenderObjectWithChildMixin for RenderClipRect

Source§

impl RenderObjectWithChildMixin for RenderColoredBox

Source§

impl RenderObjectWithChildMixin for RenderConstrainedBox

Source§

impl RenderObjectWithChildMixin for RenderConstrainedOverflowBox

Source§

impl RenderObjectWithChildMixin for RenderConstraintsTransformBox

Source§

impl RenderObjectWithChildMixin for RenderCustomPaint

Source§

impl RenderObjectWithChildMixin for RenderCustomSingleChildLayoutBox

Source§

impl RenderObjectWithChildMixin for RenderDecoratedBox

Source§

impl RenderObjectWithChildMixin for RenderFittedBox

Source§

impl RenderObjectWithChildMixin for RenderFollowerLayer

Source§

impl RenderObjectWithChildMixin for RenderFractionalTranslation

Source§

impl RenderObjectWithChildMixin for RenderFractionallySizedOverflowBox

Source§

impl RenderObjectWithChildMixin for RenderIgnorePointer

Source§

impl RenderObjectWithChildMixin for RenderIntrinsicHeight

Source§

impl RenderObjectWithChildMixin for RenderIntrinsicWidth

Source§

impl RenderObjectWithChildMixin for RenderLeaderLayer

Source§

impl RenderObjectWithChildMixin for RenderLimitedBox

Source§

impl RenderObjectWithChildMixin for RenderMetaData

Source§

impl RenderObjectWithChildMixin for RenderMouseRegion

Source§

impl RenderObjectWithChildMixin for RenderOffstage

Source§

impl RenderObjectWithChildMixin for RenderOpacity

Source§

impl RenderObjectWithChildMixin for RenderPadding

Source§

impl RenderObjectWithChildMixin for RenderPointerListener

Source§

impl RenderObjectWithChildMixin for RenderPositionedBox

Source§

impl RenderObjectWithChildMixin for RenderRepaintBoundary

Source§

impl RenderObjectWithChildMixin for RenderSizedOverflowBox

Source§

impl RenderObjectWithChildMixin for RenderSliverPadding

Source§

impl RenderObjectWithChildMixin for RenderSliverToBoxAdapter

Source§

impl RenderObjectWithChildMixin for RenderTransform

Source§

impl<T: PartialEq + 'static> RenderObjectWithChildMixin for RenderAnnotatedRegion<T>