Open kaiquegazola opened 2 years ago
@kaiquegazola you can try using in your pubspec like this:
cached_network_image:
git:
url: https://github.com/SuaMusica/flutter_cached_network_image.git
ref: feature/errorListener
path: cached_network_image
🏗 Enhancement Proposal
Expose a
ImageStreamListener
parameter inCachedNetworkImage
andCachedNetworkImageProvider
and attach it in MultiImageStreamCompleter > ImageStreamCompleter listeners.Pitch
Currently the package has an
errorListener
that is fires when an exception occurs while loading the image, but, without any information.However,
ImageStreamCompleter
has a listener that provides more information:ImageStreamListener
.Also, by attaching an
ImageStreamListener
, we can handle uncatched exceptions as described in some issues (#726, #651, Firebase Crashlytics...) as can be seen in: https://github.com/flutter/flutter/blob/a7ba717b2fa1f2afa82131272902e60b5f3630a5/packages/flutter/lib/src/painting/image_stream.dart#L669-L672Platforms affected (mark all that apply)