reportImageChunkEvent method Null safety

  1. @protected
void reportImageChunkEvent(
  1. ImageChunkEvent event

Calls all the registered ImageChunkListeners (listeners with an ImageStreamListener.onChunk specified) to notify them of a new ImageChunkEvent.


void reportImageChunkEvent(ImageChunkEvent event) {
  if (hasListeners) {
    // Make a copy to allow for concurrent modification.
    final List<ImageChunkListener> localListeners = _listeners
        .map<ImageChunkListener?>((ImageStreamListener listener) => listener.onChunk)
    for (final ImageChunkListener listener in localListeners) {