Skip to main content

Column

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
mainAxisAlignmentMainAxisAlignmentHow the children should be placed along the main axis. Defaults to MainAxisAlignment.start.
crossAxisAlignmentCrossAxisAlignmentHow the children should be placed along the cross axis. Defaults to CrossAxisAlignment.center.
mainAxisSizeMainAxisSizeHow much space should be occupied in the main axis. Defaults to MainAxisSize.max.
textDirectionTextDirection?The text direction to use for resolving alignment.
verticalDirectionVerticalDirectionThe vertical direction to use for laying out children. Defaults to VerticalDirection.down.
spacingdoubleThe spacing between children. Defaults to 0.
childrenList<Map<String, dynamic>>The list of widgets to display inside the column. Defaults to an empty list.

Example JSON​

{
"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"
}
]
}