BuilderAbsoluteItem constructor

const BuilderAbsoluteItem({
  1. Key? key,
  2. int? paintOrder,
  3. SizeUnit? width,
  4. SizeUnit? height,
  5. SizeUnit? minWidth,
  6. SizeUnit? maxWidth,
  7. SizeUnit? minHeight,
  8. SizeUnit? maxHeight,
  9. PositionUnit? top,
  10. PositionUnit? left,
  11. PositionUnit? bottom,
  12. PositionUnit? right,
  13. double? aspectRatio,
  14. required Widget builder(
    1. BuildContext context,
    2. 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,
});