pub trait ContainerBoxParentData: ContainerParentDataMixin<ChildType = AnyRenderBox> {
// Required methods
fn box_parent_data(&self) -> &BoxParentData;
fn box_parent_data_mut(&mut self) -> &mut BoxParentData;
// Provided methods
fn offset(&self) -> Offset { ... }
fn set_offset(&mut self, value: Offset) { ... }
}Expand description
Parent data for a RenderBox subclass that uses ContainerRenderObjectMixin.
Flutter’s ContainerBoxParentData: a convenience class that mixes
ContainerParentDataMixin into a BoxParentData. Here it is the pair of accessors a
container’s parent data provides, one for each half.
Required Methods§
Sourcefn box_parent_data(&self) -> &BoxParentData
fn box_parent_data(&self) -> &BoxParentData
Mixin field access: the BoxParentData half.
ParentData::provide must answer BoxParentData with
the same value, or the box protocol cannot position this child.
Sourcefn box_parent_data_mut(&mut self) -> &mut BoxParentData
fn box_parent_data_mut(&mut self) -> &mut BoxParentData
See box_parent_data.
Provided Methods§
Sourcefn offset(&self) -> Offset
fn offset(&self) -> Offset
The offset at which to paint the child in the parent’s coordinate system.
Sourcefn set_offset(&mut self, value: Offset)
fn set_offset(&mut self, value: Offset)
Sets offset.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".