Baseflow / Baseflow/flutter_cached_network_image
Completion handler snippet
- Dominant language
- Dart
- Stars
- 2.6k
- Forks
- 731
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 1
Description
## 🏗 Enhancement Proposal
Include small snippet to usage - might help Flutter newbies like myself :) Had to spend quite a plenty of time to wrap my head around what's going on in the code to implement.
```dart
CachedNetworkImageProvider cacheProviderWithEvent(String url, Function onLoadComplete) {
var manager = DefaultCacheManager();
manager.getFileStream(url).listen((event) {
if (event !is FileInfo) {
onLoadComplete?.call();
}
});
return CachedNetworkImageProvider(url, cacheManager: manager);
}
```
### Pitch
### Platforms affected (mark all that apply)
- [x] :iphone: iOS
- [x] :robot: Android
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.