layer property Null safety

FollowerLayer? layer
override

The layer we created when we were last painted.

Implementation

@override
FollowerLayer? get layer => super.layer as FollowerLayer?;
void layer=(ContainerLayer? newLayer)
@protected, inherited

Implementation

@protected
set layer(ContainerLayer? newLayer) {
  assert(
    !isRepaintBoundary,
    'Attempted to set a layer to a repaint boundary render object.\n'
    'The framework creates and assigns an OffsetLayer to a repaint '
    'boundary automatically.',
  );
  _layerHandle.layer = newLayer;
}