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

    Center

    Centers its child. A special case of Align with alignment:center .

    Type: single-child

    Center
      Text "Centered"

    Parameters

    Parameter Type Description
    widthFactor double Width multiplier relative to the child
    heightFactor double Height multiplier relative to the child

    Examples

    Centered content in a fixed-size box

    SizedBox width:300 height:200
      ColoredBox color:#36345E
        Center
          Text "Centered"

    See also

    • Align — arbitrary alignment