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§
Sourcetype ChildType: ErasedRenderObject
type ChildType: ErasedRenderObject
Flutter’s ChildType: the protocol of this render object’s child.
Required Methods§
Sourcefn child_data(
self: RenderHandle<Self>,
app: &App,
) -> &RenderObjectWithChildData<Self::ChildType>
fn child_data( self: RenderHandle<Self>, app: &App, ) -> &RenderObjectWithChildData<Self::ChildType>
Mixin field access.
Sourcefn child_data_mut(
self: RenderHandle<Self>,
app: &mut App,
) -> &mut RenderObjectWithChildData<Self::ChildType>
fn child_data_mut( self: RenderHandle<Self>, app: &mut App, ) -> &mut RenderObjectWithChildData<Self::ChildType>
See child_data.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".