Stack
The Stack widget allows you to place widgets on top of each other in a layered fashion. This is useful for creating complex UIs with overlapping elements, such as placing text over an image or creating custom floating buttons.
Properties
childAlignment
The default alignment for all children within the stack.
fit
How the non-positioned children in the stack should be sized. loose
allows them to be their natural size, while expand
forces them to fill the stack.
Child Properties
When you add a widget inside a Stack, you can configure its position
property to precisely place it within the stack's coordinate system.
position
A string that defines the child's position (e.g., top: 10, left: 10
). You can set top
, bottom
, left
, right
, width
, and height
.
Default Properties
The Stack widget supports all three sections of Default Properties.
Last updated