Picture class Null safety

An object representing a sequence of recorded graphical operations.

To create a Picture, use a PictureRecorder.

A Picture can be placed in a Scene using a SceneBuilder, via the SceneBuilder.addPicture method. A Picture can also be drawn into a Canvas, using the Canvas.drawPicture method.

Properties

approximateBytesUsed int
Returns the approximate number of bytes allocated for this object.
read-only
debugDisposed bool
Whether this reference to the underlying picture is disposed.
read-only
hashCode int
The hash code for this object.
read-onlyinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

dispose() → void
Release the resources used by this object. The object is no longer usable after this method is called.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toImage(int width, int height) Future<Image>
Creates an image from this picture.
toImageSync(int width, int height) Image
Synchronously creates a handle to an image of this picture.
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

onCreate PictureEventCallback?
A callback that is invoked to report a picture creation.
read / write
onDispose PictureEventCallback?
A callback that is invoked to report the picture disposal.
read / write