SceneBuilder class

Builds a Scene containing the given visuals.

A Scene can then be rendered using FlutterView.render.

To draw graphical operations onto a Scene, first create a Picture using a PictureRecorder and a Canvas, and then add it to the scene using addPicture.


Creates an empty SceneBuilder object.


hashCode int
The hash code for this object.
runtimeType Type
A representation of the runtime type of the object.


addPerformanceOverlay(int enabledOptions, Rect bounds) → void
Adds an object to the scene that displays performance statistics.
addPicture(Offset offset, Picture picture, {bool isComplexHint = false, bool willChangeHint = false}) → void
Adds a Picture to the scene.
addPlatformView(int viewId, {Offset offset =, double width = 0.0, double height = 0.0}) → void
Adds a platform view (e.g an iOS UIView) to the scene.
addRetained(EngineLayer retainedLayer) → void
Add a retained engine layer subtree from previous frames.
addTexture(int textureId, {Offset offset =, double width = 0.0, double height = 0.0, bool freeze = false, FilterQuality filterQuality = FilterQuality.low}) → void
Adds a backend texture to the scene.
build() Scene
Finishes building the scene.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
pop() → void
Ends the effect of the most recently pushed operation.
pushBackdropFilter(ImageFilter filter, {BlendMode blendMode = BlendMode.srcOver, BackdropFilterEngineLayer? oldLayer}) BackdropFilterEngineLayer
Pushes a backdrop filter operation onto the operation stack.
pushClipPath(Path path, {Clip clipBehavior = Clip.antiAlias, ClipPathEngineLayer? oldLayer}) ClipPathEngineLayer
Pushes a path clip operation onto the operation stack.
pushClipRect(Rect rect, {Clip clipBehavior = Clip.antiAlias, ClipRectEngineLayer? oldLayer}) ClipRectEngineLayer
Pushes a rectangular clip operation onto the operation stack.
pushClipRRect(RRect rrect, {Clip clipBehavior = Clip.antiAlias, ClipRRectEngineLayer? oldLayer}) ClipRRectEngineLayer
Pushes a rounded-rectangular clip operation onto the operation stack.
pushColorFilter(ColorFilter filter, {ColorFilterEngineLayer? oldLayer}) ColorFilterEngineLayer
Pushes a color filter operation onto the operation stack.
pushImageFilter(ImageFilter filter, {Offset offset =, ImageFilterEngineLayer? oldLayer}) ImageFilterEngineLayer
Pushes an image filter operation onto the operation stack.
pushOffset(double dx, double dy, {OffsetEngineLayer? oldLayer}) OffsetEngineLayer
Pushes an offset operation onto the operation stack.
pushOpacity(int alpha, {Offset? offset =, OpacityEngineLayer? oldLayer}) OpacityEngineLayer
Pushes an opacity operation onto the operation stack.
pushPhysicalShape({required Path path, required double elevation, required Color color, Color? shadowColor, Clip clipBehavior = Clip.none, PhysicalShapeEngineLayer? oldLayer}) PhysicalShapeEngineLayer
Pushes a physical layer operation for an arbitrary shape onto the operation stack.
pushShaderMask(Shader shader, Rect maskRect, BlendMode blendMode, {ShaderMaskEngineLayer? oldLayer, FilterQuality filterQuality = FilterQuality.low}) ShaderMaskEngineLayer
Pushes a shader mask operation onto the operation stack.
pushTransform(Float64List matrix4, {TransformEngineLayer? oldLayer}) TransformEngineLayer
Pushes a transform operation onto the operation stack.
setCheckerboardOffscreenLayers(bool checkerboard) → void
Sets whether the compositor should checkerboard layers that are rendered to offscreen bitmaps.
setCheckerboardRasterCacheImages(bool checkerboard) → void
Sets whether the raster cache should checkerboard cached entries. This is only useful for debugging purposes.
setRasterizerTracingThreshold(int frameInterval) → void
Sets a threshold after which additional debugging information should be recorded.
toString() String
A string representation of this object.


operator ==(Object other) bool
The equality operator.