PictureRecorder class abstract

Records a Picture containing a sequence of graphical operations.

To begin recording, construct a Canvas to record the commands. To end recording, use the PictureRecorder.endRecording method.

Use with the Flutter framework

The Flutter framework's RendererBinding provides a hook for creating PictureRecorder objects (RendererBinding.createPictureRecorder) that allows tests to hook into the scene creation logic. When creating a PictureRecorder and Canvas that will be used with a PictureLayer as part of the Scene in the context of the Flutter framework, consider calling RendererBinding.createPictureRecorder instead of calling the PictureRecorder.new constructor directly.

This does not apply when using a canvas to generate a bitmap for other purposes, e.g. for generating a PNG image using Picture.toImage.

Constructors

PictureRecorder()
Creates a new idle PictureRecorder. To associate it with a Canvas and begin recording, pass this PictureRecorder to the Canvas constructor.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
isRecording bool
Whether this object is currently recording commands.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

endRecording() Picture
Finishes recording graphical operations.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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