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?
💬 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 theCachedNetworkImage
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 theremoveListener
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!