ImageRef class

Inheritance

Constructors

ImageRef.fromJson(Map<String, dynamic> source)
Creates ImageRef from json representation with upgrading serialized reference to a strong one
factory

Properties

buffer Uint8List?
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
uniqueId String?
getter/setter pair

Methods

clear() → void
Releases native resources stored by the ref. If two different ImageRef objects have the same uniqueId both of them become cleared.
clone() ImageRef?
Creates a deep copy of the image.
encodeImage({EncodeImageOptions? options}) Uint8List
Returns the stored image encoded with the given options.
encodeImageInPlace() → void
hibernate() → void
Compresses ImageRef and stores it either on disk or in memory according to global settings.
info() ImageInfo
Information about stored image.
isRetained() bool
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
release() → void
Releases strong reference to the image
override
retain() → void
inherited
saveImage(String path, {SaveImageOptions? options}) bool
Saves the stored image with the given options.
toJson() Map<String, dynamic>
Converts ImageRef to json representation with acquiring serialized reference to the native resource. You must eventually call deserialize, otherwise the reference will leak
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

fromEncodedBuffer(Uint8List bytes, {BufferImageLoadOptions? options}) ImageRef?
Creates ImageRef from encoded buffer, e.g. from jpeg.
fromPath(String path, {PathImageLoadOptions? options}) ImageRef?
Creates ImageRef from the path to an image.
releaseAllImages() → void
Releases all alive images despite any existing references.