Baseflow / Baseflow/flutter_cached_network_image
Invalid image data
- Dominant language
- Dart
- Stars
- 2.6k
- Forks
- 731
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 1
Description
## 🐛 Bug Report
I got following error in firebase crashlytics report because one of our image url is wrong. It is happening even we added the errorWidget.
```
CachedNetworkImage(
width: 110.0,
fit: BoxFit.cover,
imageUrl: ebook.thumbnail,
placeholder: (context, url) => Container(color: Colors.black12),
errorWidget: (context, url, error) =>
Container(color: Colors.black12),
)
```
> Fatal Exception: io.flutter.plugins.firebase.crashlytics.FlutterError: Exception: Invalid image data. Error thrown Instance of 'ErrorDescription'.
> at .instantiateImageCodec(dart:ui)
> at ImageLoader.loadAsync(_image_loader.dart:59)
> at new MultiImageStreamCompleter.(multi_image_stream_completer.dart:25)
### Expected behavior
How do we catch if url is not correct url or 404. We already show no image icon if error occurred. So that user know that image is something wrong.
### Reproduction steps
Just put incorrect url
### Configuration
Device
Brand:OPPO
Model:F11 Pro
Orientation: Portrait
RAM free: 2.63 GB
Operating system
Version:Android 11
Orientation: Portrait
Rooted:No
Crash
Date:15 Jun 2022, 23:31:02
App version:2.0.1 (28)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.