0

Saying, I have a SliverList widget with SliverChildBuilderDelegate, which produces a card with custom image widget inside of it for each index. By custom image widget I mean widget that is kind of NetworkImage, but with support for custom caching technology. It's similar to cached_network_image.

So, the problem I'm trying to solve is that when some image fails to load and user scrolls it out from the screen, I need to retry loading this image when user for example scrolls back to it or in general when this image appears in viewport again.

Is it possible to e.g. re-call image loading function in some of the State's lifecycle methods or in delegate's builder? Or which technique should I use in this case?

Github issue #29597

vanelizarov
  • 1,064
  • 1
  • 8
  • 24
  • https://stackoverflow.com/questions/51069712/how-to-know-if-a-widget-is-visible-within-a-viewport – Daniel P Mar 20 '19 at 12:57
  • @DanielP I’ve already seen this solution. Unfortunately, it’s not memory efficient, and I need such check for every element in scrollview, not only one – vanelizarov Mar 20 '19 at 13:13

0 Answers0