$applyPaint method

  1. @override
void $applyPaint(
  1. Canvas canvas
)
override

(Internal usage) Applies the container's paint to the specified canvas.

This method is called by the parent container to paint this container on the screen. It will apply the paint of each visible child object to the canvas in the order they appear in the children list.

This method should not be called directly.

Implementation

@override
void $applyPaint(ui.Canvas canvas) {
  if (!$hasVisibleArea) {
    return;
  }
  for (var child in children) {
    if (child.$hasVisibleArea) {
      // var mask = child.$mask;
      // if (mask != null) {
      //   _drawMask(mask, child);
      // }
      //TODO: add filters.
      child.paint(canvas);
      // if (mask != null) {
      //   _eraseMask(mask, child);
      // }
    }
  }
}