We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9da805d commit 890d816Copy full SHA for 890d816
flutter_cache_manager/lib/src/cache_managers/image_cache_manager.dart
@@ -75,6 +75,10 @@ mixin ImageCacheManager on BaseCacheManager {
75
}
76
77
var image = await _decodeImage(originalFile.file);
78
+
79
+ var shouldResize = maxWidth != null ? image.width > maxWidth : false ||
80
+ maxHeight != null ? image.height > maxHeight : false;
81
+ if (!shouldResize) return originalFile;
82
if (maxWidth != null && maxHeight != null) {
83
var resizeFactorWidth = image.width / maxWidth;
84
var resizeFactorHeight = image.height / maxHeight;
0 commit comments