Skip to content

Positioned

Places its child at the given offset (and optional size) inside a Stack.

Learn more: Layout

Import: package:fleury/fleury.dart, or package:fleury/fleury_core.dart in browser code.

Stack(children: [
Text('base'),
Positioned(left: 4, top: 1, child: Text('overlay')),
])

width / height of null mean “use the child’s intrinsic size on that axis.” Using this widget outside a Stack is supported but the position is ignored — the child paints at the parent’s normal layout position.

ParameterTypeDefaultDescription
left:int0Horizontal offset from the stack’s left edge, in cells.
top:int0Vertical offset from the stack’s top edge, in rows.
width:int?—Child width in cells, or null to use its intrinsic width.
height:int?—Child height in rows, or null to use its intrinsic height.
child:WidgetrequiredContent positioned relative to the surrounding Stack.

Positioned is defined in packages/fleury/lib/src/widgets/basic.dart.

Category: Layout · All widgets