alignment property Null safety

AlignmentGeometry alignment

How to align the child within its parent's bounds.

An alignment of (0.0, 0.0) aligns the child to the top-left corner of its parent's bounds. An alignment of (1.0, 0.5) aligns the child to the middle of the right edge of its parent's bounds.

If this is set to an AlignmentDirectional object, then textDirection must not be null.

Implementation

AlignmentGeometry get alignment => _alignment;
void alignment=(AlignmentGeometry value)

Implementation

set alignment(AlignmentGeometry value) {
  assert(value != null);
  if (_alignment == value) {
    return;
  }
  _alignment = value;
  _clearPaintData();
  _markNeedResolution();
}