BuilderAbsoluteItem constructor
const
BuilderAbsoluteItem({
- Key? key,
- int? paintOrder,
- SizeUnit? width,
- SizeUnit? height,
- SizeUnit? minWidth,
- SizeUnit? maxWidth,
- SizeUnit? minHeight,
- SizeUnit? maxHeight,
- PositionUnit? top,
- PositionUnit? left,
- PositionUnit? bottom,
- PositionUnit? right,
- double? aspectRatio,
- required Widget builder(
- BuildContext context,
- LayoutBox box
Creates an absolutely positioned item with a builder function.
The builder
parameter is required and provides a function that constructs
the child widget dynamically. All positioning and sizing properties are
optional and provide fine-grained control over how this item is placed
within its parent container.
Example
BuilderAbsoluteItem(
top: PositionUnit.fixed(10),
left: PositionUnit.fixed(20),
width: SizeUnit.fixed(200),
height: SizeUnit.fixed(100),
builder: (context, layoutBox) {
return Text('Position: ${layoutBox.offset}');
},
)
Implementation
const BuilderAbsoluteItem({
super.key,
this.paintOrder,
this.width,
this.height,
this.minWidth,
this.maxWidth,
this.minHeight,
this.maxHeight,
this.top,
this.left,
this.bottom,
this.right,
this.aspectRatio,
required this.builder,
});