public override void paint(PaintingContext context, Offset offset) { if (child != null) { if (_alpha == 0) { layer = null; return; } if (_alpha == 255) { layer = null; context.paintChild(child, offset); return; } D.assert(needsCompositing); layer = context.pushOpacity(offset, _alpha, base.paint, oldLayer: layer as OpacityLayer); } }