From 7b76206f4946d197321d2399c180d55a33b746b2 Mon Sep 17 00:00:00 2001 From: Vishnu Mohandas Date: Wed, 6 May 2020 02:28:43 +0530 Subject: [PATCH] Minor refactor --- lib/ui/zoomable_image.dart | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/ui/zoomable_image.dart b/lib/ui/zoomable_image.dart index 0edaa4ab5..90c029614 100644 --- a/lib/ui/zoomable_image.dart +++ b/lib/ui/zoomable_image.dart @@ -68,9 +68,9 @@ class _ZoomableImageState extends State { } if (!_loadedFinalImage) { - final cachedImage = ImageLruCache.get(widget.photo); - if (cachedImage != null) { - _onFinalImageLoaded(cachedImage, context); + final cachedFile = ImageLruCache.get(widget.photo); + if (cachedFile != null) { + _onFinalImageLoaded(cachedFile, context); } else { widget.photo.getAsset().file.then((file) { if (mounted) { @@ -105,7 +105,6 @@ class _ZoomableImageState extends State { }); } }); - _loadedLargeThumbnail = true; } void _onFinalImageLoaded(File file, BuildContext context) {