SceneBuilder class abstract

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.

Use with the Flutter framework

The Flutter framework's RendererBinding provides a hook for creating SceneBuilder objects (RendererBinding.createSceneBuilder) that allows tests to hook into the scene creation logic. When creating a SceneBuilder in the context of the Flutter framework, consider calling RendererBinding.createSceneBuilder instead of calling the SceneBuilder.new constructor directly.

This does not apply when using the dart:ui API directly, without using the Flutter framework bindings, flutter_test framework, et al.

Constructors

SceneBuilder()
factory

Properties

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

Methods

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 = Offset.zero, 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 = Offset.zero, 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.
inherited
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 = Offset.zero, 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 = Offset.zero, OpacityEngineLayer? oldLayer}) OpacityEngineLayer
Pushes an opacity operation 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.
toString() String
A string representation of this object.
inherited

Operators

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