compactItem function
LayoutItem
compactItem(
- List<
LayoutItem> compareWith, - LayoutItem l,
- CompactType compactType,
- int cols,
- 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;
}