Ask the assistant
0/400
Your question is processed by an AI service and kept to improve answers. Do not enter personal data.

    Align

    Positions its child inside itself according to the given alignment.

    Type: single-child

    Align alignment:bottomRight
      Text "Bottom right"

    Parameters

    Parameter Type Default Description
    alignment string center Position: topLeft , topCenter , topRight , centerLeft , center , centerRight , bottomLeft , bottomCenter , bottomRight
    widthFactor double — Width multiplier relative to the child
    heightFactor double — Height multiplier relative to the child

    Examples

    A badge in the corner

    Stack
      SizedBox width:200 height:200
        ColoredBox color:#36345E
      Align alignment:topRight
        Text "NEW"
          #style fontSize:12 color:#FF0000

    See also

    • Center — a special case of Align with alignment:center
    • Stack — positioning several elements