Baseflow / Baseflow/flutter_cached_network_image

After setting memCacheHeight, .evict() is invalid

Open
#648 15 comments 1 reaction 0 assignees View on GitHub
Dominant language
Dart
Stars
2.6k
Forks
731
Avg merge
3d 9h
Merged PRs (30d)
1

Description

## code
```
CachedNetworkImage(
memCacheHeight: 200,
imageUrl:
'https://img0.baidu.com/it/u=3863723642,1799521238&fm=26&fmt=auto&gp=0.jpg');

ImageCache? imageCache = PaintingBinding.instance?.imageCache;
print(imageCache?.currentSize);
print(imageCache?.currentSizeBytes);
//-------------
CachedNetworkImageProvider(
"https://img0.baidu.com/it/u=3863723642,1799521238&fm=26&fmt=auto&gp=0.jpg",
).evict();
ImageCache? imageCache = PaintingBinding.instance?.imageCache;
print(imageCache?.currentSize);
print(imageCache?.currentSizeBytes);
```
## error
The picture still exists in memory

## version
cached_network_image: ^3.1.0
Flutter 2.2.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision f4abaa0735 (9 weeks ago) • 2021-07-01 12:46:11 -0700
Engine • revision 241c87ad80
Tools • Dart 2.13.4

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.