Skip to content

Text Align

Use text-{alignment} utilities to set the horizontal alignment of text within its container.


Use text-left, text-center, text-right, and text-justify to set the alignment of text:

Style('text-left', child: Text('So I started to walk into the water...'))
Style('text-right', child: Text('So I started to walk into the water...'))
Style('text-center', child: Text('So I started to walk into the water...'))
Style('text-justify', child: Text('So I started to walk into the water...'))

Use text-start and text-end, which use logical properties to map to either the left or right side based on the text direction:

Style('text-end', child: Text('فبدأت بالسير نحو الماء...'))
ClassFlutter equivalent
text-leftTextAlign.left
text-centerTextAlign.center
text-rightTextAlign.right
text-justifyTextAlign.justify
text-startTextAlign.start
text-endTextAlign.end