compactItem function

LayoutItem compactItem(
  1. List<LayoutItem> compareWith,
  2. LayoutItem l,
  3. CompactType compactType,
  4. int cols,
  5. List<LayoutItem> fullLayout,
)

Compact a single item within the layout.

@deprecated Use compact() instead, which handles the full layout.

Implementation

LayoutItem compactItem(
  List<LayoutItem> compareWith,
  LayoutItem l,
  CompactType compactType,
  int cols,
  List<LayoutItem> fullLayout,
) {
  final delegate = _getDelegate(compactType);
  if (delegate is VerticalCompactor) {
    return delegate._compactItemVertical(compareWith, l, cols, fullLayout);
  } else if (delegate is HorizontalCompactor) {
    return delegate._compactItemHorizontal(compareWith, l, cols, fullLayout);
  }
  return l;
}