Skip to content

v0.4.158

@uladzimir-klyshevich-epam uladzimir-klyshevich-epam tagged this 07 Oct 09:06
CSS-authored {width, height, alignment: 'center', child: {type: 'row'}} means
'center the content in the box'. Flutter's Container(alignment:) wraps the
child in an Align that hands it LOOSE constraints — a default max-size row
then stretched across the whole box and pinned its children to the start
edge (dmtools demo stage pills rendered left-flush at x=30 instead of the
centered x=602).

The container builder now flags row/column children lacking an explicit
mainAxisSize (kAlignContentMinMainAxis) and those build with
MainAxisSize.min, so the box's Align actually centers the content. An
explicit mainAxisSize keeps the stretch. The key is exported so the yoclip
renderer's overridden builders can mirror the exact contract.

Tests: container alignment centers default row/column children; explicit
mainAxisSize still stretches.
Assets 2
Loading