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 debug_describe_children(
self: RenderHandle<Self>,
app: &App,
) -> Vec<Rc<dyn DiagnosticsNode>> { ... }
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§
Sourcefn child(self: RenderHandle<Self>, app: &App) -> Option<Self::ChildType>
fn child(self: RenderHandle<Self>, app: &App) -> Option<Self::ChildType>
The render object’s unique child.
Sourcefn debug_describe_children(
self: RenderHandle<Self>,
app: &App,
) -> Vec<Rc<dyn DiagnosticsNode>>
fn debug_describe_children( self: RenderHandle<Self>, app: &App, ) -> Vec<Rc<dyn DiagnosticsNode>>
Flutter’s RenderObjectWithChildMixin.debugDescribeChildren: the child, named child.
A class with this mixin answers RenderObject::debug_describe_children with it.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".