LayoutEngine constructor

LayoutEngine({
  1. required ComponentInstance rootInstance,
  2. required List<ComponentInstance> children,
  3. required Axis direction,
  4. required Rect bounds,
  5. int childGap = 0,
})

Creates a layout engine with the given configuration.

Parameters:

  • rootInstance: The root component in the layout hierarchy
  • children: Direct children of the root instance to be laid out
  • direction: Layout direction for arranging children (horizontal/vertical)
  • bounds: The total available area for layout
  • childGap: Space between children in the layout direction, defaults to 0

Implementation

LayoutEngine({
  required this.rootInstance,
  required this.children,
  required this.direction,
  required this.bounds,
  this.childGap = 0,
});