ImageLoader class
A helper class to load and manage resources used by a ui.Image
.
To use:
- Call load with your image data
- Pass image to a RawImage widget, if it isn't null
- Call dispose to release all resources used by the image.
It is safe to call load or dispose multiple times, and calling load will automatically call dispose on the existing resources.
Constructors
Properties
- codec ↔ Codec?
-
The codec used by image.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasImage → bool
-
Whether this loader has been initialized.
no setter
- image ↔ Image?
-
The
dart:ui
instance of the current frame.getter/setter pair - isLoading ↔ bool
-
Whether an image is currently loading.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
dispose(
) → void - Disposes all the resources associated with the current frame.
-
load(
List< int> bytes) → Future<void> - Processes the next frame and stores the result in image.
-
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