SizedBox
is a function to help you organize the layout of your view. It sets the size of the component passed as parameter with the given value. This is equivalent to set the property style.size
of the component.
See how the structure is represented:
Attribute | Type | Required | Definition |
---|---|---|---|
self | StyleComponent | ✓ | Component to receive the style. |
width | Int / Double / UnitValue | ✓ | Width value. |
height | Int / Double / UnitValue | ✓ | Height value. |
SizedBox(
width = 150,
height = 150,
self = Text("simple text")
)
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.