Skip to main content

AnySingleChildRenderObjectWidget

Trait AnySingleChildRenderObjectWidget 

Source
pub trait AnySingleChildRenderObjectWidget: AnyRenderObjectWidget {
    // Required methods
    fn child(&self) -> Option<&WidgetRef>;
    fn render_object_child(
        &self,
        app: &App,
        render_object: AnyRenderObject,
    ) -> Option<AnyRenderObject>;
    fn set_render_object_child(
        &self,
        app: &mut App,
        render_object: AnyRenderObject,
        child: Option<AnyRenderObject>,
    );
}
Expand description

A SingleChildRenderObjectWidget of any type: its child, and its render object’s child slot (RenderObjectWithChildMixin) with the render objects erased.

Required Methods§

Source

fn child(&self) -> Option<&WidgetRef>

Source

fn render_object_child( &self, app: &App, render_object: AnyRenderObject, ) -> Option<AnyRenderObject>

The child of render_object, which this widget’s type created.

Source

fn set_render_object_child( &self, app: &mut App, render_object: AnyRenderObject, child: Option<AnyRenderObject>, )

Sets the child of render_object, which this widget’s type created.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§