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 all associated callbacks are equal.

Used by ImageStream and ImageStreamCompleter.

Annotations
  • @immutable

Constructors

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

Properties

hashCode int
The hash code for this object. [...]
read-only, override
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.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
override