paint method
THE FLOATS PAINT OVER THE BLOCKS OF THE FLOW, whatever the order they stand in: a context paints its in-flow blocks' backgrounds, then its floats, then the blocks' lines (CSS 2.1 Appendix E steps 4, 5 and 7). A child here is one widget, background and lines together, and what of it a float stands over is its background -- its lines are shortened round the float and a context of its own stands clear of it (9.5) -- so every child that is no float paints first, then the floats, then the FloatSlot.lifted children, which paint with the positioned boxes (step 8). A plain block with a background under a float drew over the float, which went missing.
The floats of a block of this context are the context's too, painted
over the blocks after it: a nested flow under widgets that only move
it or paint under it paints its blocks alone, and its floats and
lifted children are painted here, each in the place its block stands
in the order of the flow (fixtures/float-held-by-its-line, a 50px
float in one row hanging over the background of the next). Not one in
a float or a lifted child, which paints as a context of its own and
keeps its floats (fixtures/float-pin-box). Taps still go to the
nested flow first, through the widgets round it.
Implementation
@override
void paint(PaintingContext context, Offset offset) {
for (var layer = 0; layer <= (_painter == null ? 2 : 0); layer++) {
_paintLayer(context, offset, layer);
}
}