Skip to main content
The Stac Column allows you to build a Flutter column widget using JSON. To know more about the column widget in Flutter, refer to the official documentation.

Properties

PropertyTypeDescription
mainAxisAlignmentStacMainAxisAlignmentHow the children should be placed along the main axis. Defaults to MainAxisAlignment.start.
crossAxisAlignmentStacCrossAxisAlignmentHow the children should be placed along the cross axis. Defaults to CrossAxisAlignment.center.
mainAxisSizeStacMainAxisSizeHow much space should be occupied in the main axis. Defaults to MainAxisSize.max.
textDirectionStacTextDirectionThe text direction to use for resolving alignment.
verticalDirectionStacVerticalDirectionThe vertical direction to use for laying out children. Defaults to VerticalDirection.down.
textBaselineStacTextBaselineThe baseline to use for aligning text.
spacingdoubleThe spacing between children. Defaults to 0.
childrenList<StacWidget>The list of widgets to display inside the column. Defaults to an empty list.

Example

StacColumn(
  mainAxisAlignment: StacMainAxisAlignment.center,
  crossAxisAlignment: StacCrossAxisAlignment.start,
  mainAxisSize: StacMainAxisSize.min,
  textDirection: StacTextDirection.ltr,
  verticalDirection: StacVerticalDirection.up,
  spacing: 10,
  children: [
    StacText(data: 'Hello, World!'),
    StacContainer(
      width: 100,
      height: 100,
      color: StacColors.red,
    ),
  ],
)