Skip to main content

AnyRenderObjectWidget

Trait AnyRenderObjectWidget 

Source
pub trait AnyRenderObjectWidget {
    // Required methods
    fn create_render_object(
        &self,
        app: &mut App,
        context: BuildContext,
    ) -> AnyRenderObject;
    fn update_render_object(
        &self,
        app: &mut App,
        context: BuildContext,
        render_object: AnyRenderObject,
    );
    fn did_unmount_render_object(
        &self,
        app: &mut App,
        render_object: AnyRenderObject,
    );
    fn debug_visit_onstage_children(
        &self,
        app: &App,
        children: &[AnyElement],
        visitor: &mut dyn FnMut(AnyElement),
    );
}
Expand description

A RenderObjectWidget of any type, as the framework’s render object elements reach it: its render object calls with the render object erased, so those elements are not copied per widget type.

Required Methods§

Source

fn create_render_object( &self, app: &mut App, context: BuildContext, ) -> AnyRenderObject

Source

fn update_render_object( &self, app: &mut App, context: BuildContext, render_object: AnyRenderObject, )

RenderObjectWidget::update_render_object on the render object this widget’s type creates.

Source

fn did_unmount_render_object( &self, app: &mut App, render_object: AnyRenderObject, )

RenderObjectWidget::did_unmount_render_object on the render object this widget’s type creates.

Source

fn debug_visit_onstage_children( &self, app: &App, children: &[AnyElement], visitor: &mut dyn FnMut(AnyElement), )

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§