inflating_element library

This library contains the internal logic of CustomBoxy, useful if you want to implement a custom RenderObject that inflates arbitrary widgets at layout time.

InflatingElement works in a similar fashion to LayoutBuilder, calling BuildOwner.buildScope to create a build scope and RenderObject.invokeLayoutCallback to allow tree mutations.

Classes

InflatedChildHandle
The base class for lazily-inflated handles used to keep track of children in a LayoutInflatingWidget.
InflatingElement
An Element that uses a LayoutInflatingWidget as its configuration, this is similar to MultiChildRenderObjectElement but allows multiple children to be inflated during layout.
InflatingParentData<ChildType extends RenderObject>
Parent data type of InflatingRenderObjectMixin, provides an id for the child similar to MultiChildLayoutParentData.
LayoutInflatingWidget
The base class for widgets that can inflate arbitrary widgets during layout.

Mixins

InflatingRenderObjectMixin<ChildType extends RenderObject, ParentDataType extends InflatingParentData<ChildType>, ChildHandleType extends InflatedChildHandle>
Mixin for RenderObjects that can inflate arbitrary widgets during layout.

Typedefs

InflatedChildHandleFactory = T Function<T extends InflatedChildHandle>({Element? context, required Object id, required InflatingRenderObjectMixin<RenderObject, InflatingParentData<RenderObject>, InflatedChildHandle> parent, RenderObject? render, Widget? widget})
Signature for constructors of InflatedChildHandle subclasses, used for InflatingRenderObjectMixin.childFactory.