FlexboxContainerComponent
Sealed base class for flexbox container components (Column/Row) that extends Component directly instead of the legacy SpecGeneratedComponent.
Supports both uniform gaps (via gap) and direction-specific gaps (via mainAxisGap and crossAxisGap).
Gap Parameters:
gap: Uniform gap applied to both main and cross axes (maps to YogaGutter.ALL). Backward compatible.
mainAxisGap: Gap along the main axis (direction of flexDirection). For Row: horizontal spacing. For Column: vertical spacing. Maps to YogaGutter.COLUMN for Row, YogaGutter.ROW for Column.
crossAxisGap: Gap along the cross axis (perpendicular to flexDirection). For Row: vertical spacing. For Column: horizontal spacing. Maps to YogaGutter.ROW for Row, YogaGutter.COLUMN for Column.
When to use each:
Use gap when you need uniform spacing in all directions (most common case).
Use mainAxisGap and crossAxisGap when you need different spacing along each axis, typically when wrap=WRAP to control spacing between wrapped rows/columns separately from spacing within a row/column.
If both gap and direction-specific gaps are provided, direction-specific gaps take precedence.
Gap values are held as Dimen and resolved to pixels at layout time, so the construction site does not need a ComponentContext or com.facebook.litho.ResourcesScope to build a container.
Inheritors
Functions
This indicates the type of the Object that will be returned by mount.
Compares this component to a different one to check if they are the same
Should not be used! Components should be manually measured only as part of a LayoutState calculation. This will measure a component and set the size in the outputSize object but the measurement result will not be cached and reused for future measurements of this component.
Returns the component's resolve result for a deferred resolution. The framework invokes this instead of the resolve if the component needs to defer its resolution until layout.