textAlign property Null safety

TextAlign textAlign

How the text should be aligned horizontally.

After this is set, you must call layout before the next call to paint.

The textAlign property must not be null. It defaults to TextAlign.start.

Implementation

TextAlign get textAlign => _textAlign;
void textAlign=(TextAlign value)

Implementation

set textAlign(TextAlign value) {
  assert(value != null);
  if (_textAlign == value) {
    return;
  }
  _textAlign = value;
  markNeedsLayout();
}