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

    Divider

    A thin dividing line. Horizontal by default — between the rows of a column; with axis:vertical it is vertical, between the elements of a row.

    Type: leaf

    Column
      Text "Above"
      Divider
      Text "Below"

    Parameters

    Parameter Type Default Description
    axis string horizontal horizontal or vertical
    thickness double — Thickness of the line itself
    color color theme color Line color
    indent double 0 Empty space before the line starts
    endIndent double 0 Empty space after the line ends
    height double — Vertical space a horizontal divider takes (the line sits inside it)
    width double — Horizontal space a vertical divider takes

    The size "across" the line is named after the axis it lies across: height for a horizontal divider, width for a vertical one.

    Examples

    A customized line

    Column
      Text "Section"
      Divider height:20 thickness:2 color:#e0e0e0 indent:16 endIndent:16
      Text "Next section"

    A vertical divider

    SizedBox height:24
      Row spacing:8
        Text "Left"
        Divider axis:vertical width:16
        Text "Right"

    On the site this markup shows no line (see below); a version that works everywhere:

    Row spacing:8
      Text "Left"
      SizedBox width:1 height:24
        ColoredBox color:#cccccc
      Text "Right"

    Differences between the app and the site

    • On the site Divider is drawn as the top border of a block, so it is horizontal only. axis:vertical and width are not read on the site — a vertical divider is not visible there. For a vertical line that must also work on the site, build it by hand: a narrow SizedBox filled with ColoredBox .
    • The default color on the site is light gray #e0e0e0 ; in the app it is the divider color from the theme.

    See also