Baseflow / flutter_cache_manager

Generic cache manager for flutter
https://baseflow.com
MIT License
749 stars 438 forks source link

Image cache with resize functionality #236

Closed renefloor closed 3 years ago

renefloor commented 3 years ago

:sparkles: What kind of change does this PR introduce? (Bug fix, feature, docs update...)

Feature

:arrow_heading_down: What is the current behavior?

Currently you can't cache resized images

:new: What is the new behavior (if this is a feature change)?

When asking for a specific size it checks the cache. If it is not in the cache it downloads and caches the original and caches the resized version as well. It uses the new key logic for that, for example resized_h100_w200_url.

It is implemented as a mixin on the BaseCacheManager.

:boom: Does this PR introduce a breaking change?

No

:bug: Recommendations for testing

:memo: Links to relevant issues/docs

:thinking: Checklist before submitting

codecov[bot] commented 3 years ago

Codecov Report

Merging #236 (d9061bd) into develop (b3abecd) will increase coverage by 1.46%. The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #236      +/-   ##
===========================================
+ Coverage    74.64%   76.11%   +1.46%     
===========================================
  Files           20       21       +1     
  Lines          635      674      +39     
===========================================
+ Hits           474      513      +39     
  Misses         161      161              
Impacted Files Coverage Δ
.../lib/src/cache_managers/default_cache_manager.dart 0.00% <ø> (ø)
...er/lib/src/cache_managers/image_cache_manager.dart 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update b3abecd...d9061bd. Read the comment docs.