Skip to main content

Align

Stac align allows you to build the Flutter align widget using JSON. To know more about the align widget in Flutter, refer to the official documentation.

Properties​

PropertyTypeDescription
alignmentStacAlignmentHow to align the child.
widthFactordoubleIf non-null, sets its width to the child's width multiplied by this factor.
heightFactordoubleIf non-null, sets its height to the child's height multiplied by this factor.
childMap<String,dynamic>The widget below this widget in the tree.

Example​

{
"type": "align",
"alignment": "topEnd",
"child": {
"type": "container",
"color": "#FC5632",
"clipBehavior": "hardEdge",
"height": 250,
"width": 200,
"child": {
"type": "align",
"alignment": "bottomCenter",
"child": {
"type": "text",
"data": "Flutter",
"style": {
"fontSize": 23,
"fontWeight": "w600"
}
}
}
}
}