Row

The Row widget arranges its child widgets horizontally. It's commonly used to display multiple widgets, one after another. For instance, if you want to display a text label and an icon side by side, you can use this widget.

Here’s how the Row arranges its children:

Add Row widget

To add a Row widget:

  1. Open the Widget Palette and locate the Row widget under the Layout Elements tab. You can drag it into your desired location or add it directly from the widget tree.

  2. Add a few widgets inside the Row. You'll see them neatly lined up in a horizontal arrangement.

Customizing

You can customize the appearance and behavior of this widget using the various properties available under the properties panel.

Changing Main Axis Size

For a Row, the Main Axis runs horizontally, and the Cross Axis runs vertically. By default, all the children inside the Row will be arranged in a horizontal fashion.

The Main Axis Size defines how much space a Row should occupy in the main axis (i.e., horizontal direction).

You can set the main axis size using the following two options:

Adjust the Main Axis Alignment

The Main Axis for a Row widget is the horizontal axis, so adjusting this will change how the child widgets are horizontally distributed in the Row.

You can adjust the main axis alignment using the following options:

  1. Start: Aligns children to the start of the row.

  2. Center: Centers children horizontally within the row.

  3. End: Aligns children to the end of the row.

  4. Space Evenly: Distributes children evenly across the row, with equal spacing between them.

  5. Space Around: Spaces children evenly, but also adds extra space before the first and after the last child.

  6. Space Between: Evenly spaces children across the row, without extra space at the start or end.

To change the Main Axis Alignment, move to the Properties Panel > Row Properties > Main Axis Alignment > select the preferred alignment option.

Adjust the Cross Axis Alignment

The Cross Axis for a Row Widget is the vertical axis, so adjusting this will change how the child widgets are vertically distributed in the Row.

You can adjust the cross axis alignment using the following options:

  1. Start: Aligns child elements to the top of the row.

  2. Center: Centers child elements vertically within the row.

  3. End: Aligns child elements to the bottom of the row.

  4. Stretch: Stretches each child to fill the height of the row.

To change the Cross Axis Alignment, move to the Properties Panel > Row Properties > Cross Axis Alignment > select the preferred alignment option.

Sizing widgets inside the Row

See how to size widgets inside the Row.

Make row scrollable

When the total width of the children in a Row exceeds the available screen space, making the row scrollable prevents content from being cut off or rendered inaccessible.

Showing empty list widget

See how to display an empty list widget when there is no data.

Add item spacing

See how to add space between items here.

Primary property

See how to use the primary property here.

Common widget properties

See how to work with Widget Styling, Visibility, Padding & Alignment, and Testing.


Video guide

If you prefer watching a video tutorial, here's the one for you:


Last Updated Date: January 24, 2024

Last updated