Adds a listener callback that is called whenever a concrete ImageInfo object is available. If a concrete image is already available, this object will call the listener synchronously.
The listener will be passed a flag indicating whether a synchronous call occurred. If the listener is added within a render object paint function, then use this flag to avoid calling markNeedsPaint during a paint.
Source
void addListener(ImageListener listener) { _listeners.add(listener); if (_current != null) { try { listener(_current, true); } catch (exception, stack) { _handleImageError('by a synchronously-called image listener', exception, stack); } } }