diff --git a/lib/components/image/resilient_network_image.dart b/lib/components/image/resilient_network_image.dart index 0302bf88d..ae8fd8e62 100644 --- a/lib/components/image/resilient_network_image.dart +++ b/lib/components/image/resilient_network_image.dart @@ -146,8 +146,11 @@ class ResilientNetworkImage extends ImageProvider { if (await cacheFile.exists() && await etagFile.exists()) { try { final bytes = await cacheFile.readAsBytes(); - decodedCache = await decode(await ImmutableBuffer.fromUint8List(bytes)); - etagValue = await etagFile.readAsString(); + if (bytes.isNotEmpty) { + decodedCache = + await decode(await ImmutableBuffer.fromUint8List(bytes)); + etagValue = await etagFile.readAsString(); + } } catch (e) { FirebaseCrashlytics.instance.recordError(e, StackTrace.current); }