createChildContext method

  1. @override
PaintingContext createChildContext(
  1. ContainerLayer childLayer,
  2. Rect bounds
)
override

Creates a painting context configured to paint into childLayer.

The bounds are estimated paint bounds for debugging purposes.

Implementation

@override
PaintingContext createChildContext(ContainerLayer childLayer, ui.Rect bounds) {
  return _ChildSpoilerPaintingContext(
    layer: childLayer,
    estimatedBounds: bounds,
    rootRects: spoilerRects,
    calculateRects: calculateRects,
  );
}