RenderTableLayout constructor

RenderTableLayout({
  1. List<RenderBox>? children,
  2. required TableSizeSupplier width,
  3. required TableSizeSupplier height,
  4. required Clip clipBehavior,
  5. CellPredicate? frozenCell,
  6. CellPredicate? frozenRow,
  7. double? verticalOffset,
  8. double? horizontalOffset,
  9. Size? viewportSize,
})

Creates a render object for table layout.

Initializes the table layout system with sizing functions and optional frozen cell configurations. This render object handles the complex layout calculations for tables with variable cell sizes.

Parameters:

  • children (List<RenderBox>?): Optional initial child render boxes
  • width (TableSizeSupplier, required): Function providing width for each column
  • height (TableSizeSupplier, required): Function providing height for each row
  • clipBehavior (Clip, required): How to clip children outside table bounds
  • frozenCell (CellPredicate?): Predicate identifying frozen columns
  • frozenRow (CellPredicate?): Predicate identifying frozen rows
  • verticalOffset (double?): Vertical scroll offset for viewport
  • horizontalOffset (double?): Horizontal scroll offset for viewport
  • viewportSize (Size?): Size of the visible viewport area

Frozen cells remain visible during scrolling, useful for sticky headers.

Implementation

RenderTableLayout(
    {List<RenderBox>? children,
    required TableSizeSupplier width,
    required TableSizeSupplier height,
    required Clip clipBehavior,
    CellPredicate? frozenCell,
    CellPredicate? frozenRow,
    double? verticalOffset,
    double? horizontalOffset,
    Size? viewportSize})
    : _clipBehavior = clipBehavior,
      _width = width,
      _height = height,
      _frozenColumn = frozenCell,
      _frozenRow = frozenRow,
      _verticalOffset = verticalOffset,
      _horizontalOffset = horizontalOffset,
      _viewportSize = viewportSize {
  addAll(children);
}