alignment property
How to align the non-positioned or partially-positioned children in the stack.
The non-positioned children are placed relative to each other such that the points determined by alignment are co-located. For example, if the alignment is Alignment.topLeft, then the top left corner of each non-positioned child will be located at the same global coordinate.
Partially-positioned children, those that do not specify an alignment in a
particular axis (e.g. that have neither top
nor bottom
set), use the
alignment to determine how they should be positioned in that
under-specified axis.
If this is set to an AlignmentDirectional object, then textDirection must not be null.
Implementation
AlignmentGeometry get alignment => _alignment;
Implementation
set alignment(AlignmentGeometry value) {
assert(value != null);
if (_alignment == value)
return;
_alignment = value;
_markNeedResolution();
}