Positioned constructor
const
Positioned({})
Creates a widget that controls where a child of a Stack is positioned.
Only two out of the three horizontal values (left
, right
,
width
), and only two out of the three vertical values (top
,
bottom
, height
), can be set. In each case, at least one of
the three must be null.
See also:
- Positioned.directional, which specifies the widget's horizontal
position using
start
andend
rather thanleft
andright
. - PositionedDirectional, which is similar to Positioned.directional but adapts to the ambient Directionality.
Implementation
const Positioned(
{super.key,
this.left,
this.top,
this.right,
this.bottom,
this.width,
this.height,
required this.child})
: assert(left == null || right == null || width == null),
assert(top == null || bottom == null || height == null);