I’m getting a list of image urls from api. I am showing image at zero index on loading api. There’s a slider widget, on changing it i put the value as image index and show images based on that. But when i load next image theres a white space which keeps showing. I want it to be smooth as if i am watching a timelapse. I have attached the image below on slider change i want to next image. I used precacheimage as well but it is still showing whitespace/loading when i move slider.
Future<void> preloadImages(List<String> imageUrls) async {
for (String url in imageUrls) {
await precacheImage(CachedNetworkImageProvider(url), context);
}
this.imageUrls = imageUrls;
}
2
Answers