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