addToScene method Null safety

  1. @override
void addToScene(
  1. SceneBuilder builder
)
override

Override this method to upload this layer to the engine.

Return the engine layer for retained rendering. When there's no corresponding engine layer, null is returned.

Implementation

@override
void addToScene(ui.SceneBuilder builder) {
  assert(filter != null);
  engineLayer = builder.pushBackdropFilter(
    filter!,
    blendMode: blendMode,
    oldLayer: _engineLayer as ui.BackdropFilterEngineLayer?,
  );
  addChildrenToScene(builder);
  builder.pop();
}