scheduleInitialPaint method Null safety

void scheduleInitialPaint(
  1. ContainerLayer rootLayer
)

Bootstrap the rendering pipeline by scheduling the very first paint.

Requires that this render object is attached, is the root of the render tree, and has a composited layer.

See RenderView for an example of how this function is used.

Implementation

void scheduleInitialPaint(ContainerLayer rootLayer) {
  assert(rootLayer.attached);
  assert(attached);
  assert(parent is! RenderObject);
  assert(!owner!._debugDoingPaint);
  assert(isRepaintBoundary);
  assert(_layerHandle.layer == null);
  _layerHandle.layer = rootLayer;
  assert(_needsPaint);
  owner!._nodesNeedingPaint.add(this);
}