Row class Components Layout
A Row arranges its child Component widgets horizontally in sequence.
The Row is a layout component that places its children from left to right, respecting their intrinsic sizes and any horizontal gaps specified via childGap. It does not scroll; if content overflows the available space, it will be clipped by the parent.
Layout Behavior
- Each child is measured based on the maximum available size.
- The overall height is the maximum height of its children.
- The overall width is the sum of its children's widths, plus the childGap between each.
Example
final row = Row(
children: [
TextComponent("Hello"),
TextComponent("World"),
],
childGap: 2,
);
See Also
- Column for vertical layouts.
- ParentComponentInstance for parent-child layout handling.
- CanvasBuffer for rendering operations.
Constructors
Properties
- childGap → int
-
The number of columns (in terminal cells) to leave between each child.
final
-
children
→ List<
Component> -
The list of child Components to be displayed horizontally.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- padding → EdgeInsets
-
The padding inside the component’s layout bounds.
finalinherited
- position → Position?
-
The position of the component within its parent or layout.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createInstance(
) → ComponentInstance -
Creates a ComponentInstance that can be rendered.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited