Properties
| Property | Type | Description |
|---|---|---|
| mainAxisAlignment | StacMainAxisAlignment | How the children should be placed along the main axis. Defaults to MainAxisAlignment.start. |
| crossAxisAlignment | StacCrossAxisAlignment | How the children should be placed along the cross axis. Defaults to CrossAxisAlignment.center. |
| mainAxisSize | StacMainAxisSize | How much space should be occupied in the main axis. Defaults to MainAxisSize.max. |
| textDirection | StacTextDirection | The text direction to use for resolving alignment. |
| verticalDirection | StacVerticalDirection | The vertical direction to use for laying out children. Defaults to VerticalDirection.down. |
| textBaseline | StacTextBaseline | The baseline to use for aligning text. |
| spacing | double | The spacing between children. Defaults to 0. |
| children | List<StacWidget> | The list of widgets to display inside the column. Defaults to an empty list. |
Example
- Dart
- JSON
- Preview
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,
),
],
)
{
"type": "column",
"mainAxisAlignment": "center",
"crossAxisAlignment": "start",
"mainAxisSize": "min",
"textDirection": "ltr",
"verticalDirection": "up",
"spacing": 10,
"children": [
{
"type": "text",
"data": "Hello, World!"
},
{
"type": "container",
"width": 100,
"height": 100,
"color": "#FF0000"
}
]
}