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.
- Inheritance
-
- Object
- ChangeNotifier
- ImageLoader
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
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- image ↔ Image?
-
The
dart:uiinstance 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
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
dispose(
) → void -
Disposes all the resources associated with the current frame.
override
-
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
-
notifyListeners(
) → void -
Call all the registered listeners.
override
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited