flutter_cached_network_image
flutter_cached_network_image copied to clipboard
Is the errorListener method disposed after the CachedNetworkImage is disposed?
💬 Questions and Help
I'm implementing a custom logging mechanism when the image loading fails. I found the errorListener really useful to get that info, but after some performance testing I noticed the callback from errorListener
gets called even if the CachedNetworkImage
widget gets disposed.
I took a look at the code and wasn't able to find a place where the method removeListener
was used, except from testing files.
I'm asking this, because it seems like the regular Image.network
widget from Flutter does call the removeListener
method. If the method is not being called in this package, is there any reason to not do it? Is it safe from memory leaks?
Thanks!