flutter_cached_network_image
flutter_cached_network_image copied to clipboard
FileSystemException: Cannot open file, path = 'C:\Users\User\AppData\Roaming\com.example\examole\libCachedImageData.json'
Sometimes this error happens(Usually in release mode) with message that file is busy by some system entity.
_File.open.<anonymous closure> (dart:io/file_impl.dart:356)#1 _rootRunUnary (dart:async/zone.dart:1436)<asynchronous suspension>#2 JsonCacheInfoRepository._saveFile (package:flutter_cache_manager/src/storage/cache_info_repositories/json_cache_info_repository.dart:191)<asynchronous suspension>
I think it will be good to wrap all file operations into try catch.
This is a very rare issue and i can not reproduce it by myself, but i have errors logging system by RunZodedGuarded and Flutter.onError and see that this happens with users of my app.
By the way i use errorWidget for all CachedNetworkImages
