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')),])Details
Section titled “Details”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.
Constructors
Section titled “Constructors”Positioned()
Section titled “Positioned()”| Parameter | Type | Default | Description |
|---|---|---|---|
left: | int | 0 | Horizontal offset from the stack’s left edge, in cells. |
top: | int | 0 | Vertical 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: | Widget | required | Content positioned relative to the surrounding Stack. |
Source
Section titled “Source”Positioned is defined in packages/fleury/lib/src/widgets/basic.dart.
Category: Layout · All widgets