Stack
Overlapping layout (z-order)
Layers its children, later ones in front. alignment positions them all at once.
Methods
Stack(options?)WidgetNodeZ-axis stacking container.
- options Any
- alignment Alignment
Where every child sits. Default center.
- children [WidgetNode] required
A plain array. Push to it, map into it, spread it.
- alignment Alignment
Examples
Overlay badge
Stack({
alignment: Alignment.topRight,
children: [
new Image.symbol("bell.fill", {fontSize: 32}),
Container({
backgroundColor: Color.red(),
borderRadius: 8,
padding: EdgeInsets.all(4),
child: Text("3", {
color: Color.white(), font: Font.system(10)
})
})
]
})