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§
Sourcefn create_render_object(
&self,
app: &mut App,
context: BuildContext,
) -> AnyRenderObject
fn create_render_object( &self, app: &mut App, context: BuildContext, ) -> AnyRenderObject
Sourcefn update_render_object(
&self,
app: &mut App,
context: BuildContext,
render_object: AnyRenderObject,
)
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.
Sourcefn did_unmount_render_object(
&self,
app: &mut App,
render_object: AnyRenderObject,
)
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.
Sourcefn debug_visit_onstage_children(
&self,
app: &App,
children: &[AnyElement],
visitor: &mut dyn FnMut(AnyElement),
)
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".