Positioned
Positioned is a widget in Flutter that allows you to position a child widget relative to its parent widget.
Here's an example:
Stack(
children: <Widget>[
Container(
height: 200,
width: 200,
color: Colors.blue,
),
Positioned(
top: 50,
left: 50,
child: Container(
height: 100,
width: 100,
color: Colors.red,
),
),
],
)In this example, the Positioned widget is used to place a red container 50 pixels from the top and 50 pixels from the left of its parent container, which is a blue square created using the Container widget.
Attributes
top: The distance between the top edge of the child and the top edge of the parent.
left: The distance between the left edge of the child and the left edge of the parent.
right: The distance between the right edge of the child and the right edge of the parent.
bottom: The distance between the bottom edge of the child and the bottom edge of the parent.
width: The width of the child.
height: The height of the child.