ImageStreamListener class

Interface for receiving notifications about the loading of an image.

This class overrides operator == and hashCode to compare the individual callbacks in the listener, meaning that if you add an instance of this class as a listener (e.g. via ImageStream.addListener), you can instantiate a different instance of this class when you remove the listener, and the listener will be properly removed as long as all associated callbacks are equal.

Used by ImageStream and ImageStreamCompleter.

Annotations

Constructors

ImageStreamListener(ImageListener onImage, {ImageChunkListener? onChunk, ImageErrorListener? onError})
Creates a new ImageStreamListener.
const

Properties

hashCode int
The hash code for this object.
no setteroverride
onChunk ImageChunkListener?
Callback for getting notified when a chunk of bytes has been received during the loading of the image.
final
onError ImageErrorListener?
Callback for getting notified when an error occurs while loading an image.
final
onImage ImageListener
Callback for getting notified that an image is available.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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.
override