Skip to main content

FractionallySizedBox

The Stac FractionallySizedBox allows you to build a Flutter fractionally sized box widget using JSON. To know more about the fractionally sized box widget in Flutter, refer to the official documentation.

Properties​

PropertyTypeDescription
alignmentStacAlignment?The alignment of the child within the fractionally sized box.
widthFactordouble?The fraction of the available width to use.
heightFactordouble?The fraction of the available height to use.
childMap<String, dynamic>?The widget to display inside the fractionally sized box.

Example JSON​

{
"type": "fractionallySizedBox",
"alignment": "center",
"widthFactor": 0.5,
"heightFactor": 0.5,
"child": {
"type": "container",
"color": "#FF5733",
"child": {
"type": "text",
"data": "Hello, World!"
}
}
}