Skip to main content

Flexible

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

Properties​

PropertyTypeDescription
childMap<String, dynamic>?The widget to display inside the flexible widget.
flexintThe flex factor to use for the flexible widget. Defaults to 1.
fitFlexFitHow the child should be inscribed into the available space. Defaults to FlexFit.loose.

Example JSON​

{
"type": "flexible",
"flex": 2,
"fit": "tight",
"child": {
"type": "text",
"data": "Hello, World!"
}
}