render method

void render(
  1. Canvas canvas, {
  2. Vector2? position,
})

Implementation

void render(Canvas canvas, {Vector2? position}) {
  canvas.save();
  if (position != null) {
    canvas.translateVector(position);
  }
  canvas.clipRect(_clipRect);
  layers.forEach((layer) {
    canvas.save();
    layer.render(canvas);
    canvas.restore();
  });
  canvas.restore();
}