addToScene method
- SceneBuilder builder
override
Override this method to upload this layer to the engine.
Implementation
@override
void addToScene(ui.SceneBuilder builder) {
assert(transform != null);
_lastEffectiveTransform = transform;
if (offset != Offset.zero) {
_lastEffectiveTransform = Matrix4.translationValues(offset.dx, offset.dy, 0.0)
..multiply(_lastEffectiveTransform!);
}
engineLayer = builder.pushTransform(
_lastEffectiveTransform!.storage,
oldLayer: _engineLayer as ui.TransformEngineLayer?,
);
addChildrenToScene(builder);
builder.pop();
}