textDirection property

  1. @override
TextDirection textDirection
override

The directionality of the text.

This decides how the TextAlign.start, TextAlign.end, and TextAlign.justify values of textAlign are interpreted.

This is also used to disambiguate how to render bidirectional text. For example, if the text is an English phrase followed by a Hebrew phrase, in a TextDirection.ltr context the English phrase will be on the left and the Hebrew phrase to its right, while in a TextDirection.rtl context, the English phrase will be on the right and the Hebrew phrase on its left.

This must not be null.

Implementation

@override
TextDirection get textDirection => _textPainter.textDirection!;
  1. @override
void textDirection=(TextDirection value)
override

Implementation

@override
set textDirection(TextDirection value) {
  if (_textPainter.textDirection == value) return;
  _textPainter.textDirection = value;
  markNeedsLayout();
}