Row

The Row widget is a layout widget that arranges its children in a horizontal sequence. It is essential for building layouts where elements are positioned side-by-side.

For a row widget, the main axis runs horizontally and the cross axis runs vertically.

Data Source

The Row widget has a Data Source toggle. When enabled, you can turn the button on to add either static list data or dynamic data using expressions for dynamically generating children widgets.

Properties

Property
Description

Main Axis Alignment

How the children should be placed along the main (horizontal) axis. Options include start, center, end, spaceBetween, spaceAround, and spaceEvenly.

Cross Axis Alignment

How the children should be placed along the cross (vertical) axis. Options include start, center, end, and stretch.

Main Axis Size

How much space the row should occupy on the main (horizontal) axis. max tries to fill the available space, while min fits the size of its children.

Scrollable

If true, the row's content can be scrolled if it overflows the available space.

Child Properties

When you add a widget inside a Row, you can configure its expansion properties:

Property
Description

Type

The type of expansion. Can be None (default), Loose, or Tight.

Flex Value

If the type is Loose or Tight, this numeric value determines the proportion of space the child will occupy relative to its siblings.


Default Properties

The Row widget supports all Default Properties

Last updated