Prevent multiple load image calls

This commit is contained in:
vishnukvmd 2023-01-17 21:09:48 +05:30
parent bb89a1ddf3
commit 169831dec7

View file

@ -113,6 +113,11 @@ class _ZoomableImageState extends State<ZoomableImage>
}
void _loadNetworkImage() {
if (_loadingFinalImage) {
return;
} else {
_loadingFinalImage = true;
}
if (!_loadedSmallThumbnail && !_loadedFinalImage) {
final cachedThumbnail = ThumbnailInMemoryLruCache.get(_photo);
if (cachedThumbnail != null) {