layer property

OffsetLayer layer

The compositing layer that this render object uses to repaint.

Call only when isRepaintBoundary is true and the render object has already painted.

To access the layer in debug code, even when it might be inappropriate to access it (e.g. because it is dirty), consider debugLayer.


OffsetLayer get layer {
  assert(isRepaintBoundary, 'You can only access RenderObject.layer for render objects that are repaint boundaries.');
  return _layer;