- Added getFileStream to CacheManager
- getFileStream has an optional parameter 'withProgress' to receive progress.
- getFileStream returns a FileResponse which is either a FileInfo or a DownloadProgress.
- Changes to FileFetcher and FileFetcherResponse:
- FileFetcher is now replaced with a FileService which is a class instead of a function.
- FileServiceResponse doesn't just give magic headers, but concrete implementation of the needed information.
- FileServiceResponse gives a contentStream instead of content for more efficient handling of the data.
- FileServiceResponse contains contentLength with information about the total size of the content.
- Changes in CacheStore for testability:
- CleanupRunMinInterval can now be set.
- Expects a mockable directory instead of a path.
- Added CacheInfoRepository interface to possibly replace the current CacheObjectProvider based on sqflite.
- Changes in WebHelper
- Files are now always saved with a new name. Files are first saved to storage before old file is removed.
- General code quality improvements
- Use try-catch in WebHelper so VM understands that errors are not uncaught.
- Better error handling (really better this time).
- Fix that oldest files are removed, and not the newest.
- Fix error when cache data exists, but file is already removed.
- await on putFile
- Changed error handling back to throwing the error as it is supposed to be.
- New method to get fileinfo from memory.
- Better error handling.
- Keep SQL connection open during session.
- Update dependencies
- Fixed image loading after loading failed once.
- Added method to clear cache
- Complete refactor of library
- Use of SQFlite instead of shared preferences for cache info
- Added the option to use a custom file fetcher (for example for firebase)
- Support for AndroidX
- Fixed library compatibility issue
- Fixed library compatibility issue
- Improved some synchronization
- Fixed some issues when file could not be downloaded the first time it is trying to be retrieved.
- Fixed ConcurrentModificationError in cache cleaning
- Added optional headers
- Moved to Dart 2.0
- Fixed nullpointer when non-updated file (a 304 response) has no cache-control period.
- Fixed issues with cache cleaning
- Fixed relative paths on iOS.
- Did some refactoring and made a useful readme.
- Extracted the cache manager from cached_network_image