In flutter_cache_manager.dart on line 64, I have a key where the corresponding data value is null. This causes a crash. The cause is a link to an image that has been removed and returns 404.
_cacheData[key] = new CacheObject.fromMap(key, data)
In my case the error is caught further up:
[VERBOSE-2:dart_error.cc(16)] Unhandled exception:
'package:flutter/src/painting/image_stream.dart': Failed assertion: line 362 pos 12: '_codec != null': is not true.
#0 _AssertionError._doThrowNew (dart:core/runtime/liberrors_patch.dart:37:39)
#1 _AssertionError._throwNew (dart:core/runtime/liberrors_patch.dart:33:5)
#2 MultiFrameImageStreamCompleter._handleCodecReady (package:flutter/src/painting/image_stream.dart)
#3 _RootZone.runUnary (dart:async/zone.dart:1381:54)
#4 _FutureListener.handleValue (dart:async/future_impl.dart:129:18)
#5 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:637:45)
#6 Future._propagateToListeners (dart:async/future_impl.dart:666:32)
#7 Future._completeError (dart:async/future_impl.dart:489:5)
#8 _SyncCompleter._completeError (dart:async/future_impl.dart:55:12)
#9 _Completer.completeError (dart:async/future_impl.dart:27:5)
#10 CachedNetworkImageProvider._loadAsync (package:cached_network_im<…>
In flutter_cache_manager.dart on line 64, I have a key where the corresponding data value is null. This causes a crash. The cause is a link to an image that has been removed and returns 404.
_cacheData[key] = new CacheObject.fromMap(key, data)In my case the error is caught further up: