In my app I have a large number of small logos available for loading by Image.asset. These logos are embedded in the app. These logos correspond to brands that my app currently knows about. However, there are there are other brands that I do not have logos for and I need to handle this also.
If for some reason I am trying to load a logo that I don't have in the app, I just want to show a blank text view. This seems to be all working fine BUT for some reason Crashlytics is saying there are app crashes BUT I don't think the app is actually crashing.
Here is an example of the error I see in Crashlytics...
Fatal Exception: io.flutter.plugins.firebase.crashlytics.FlutterError Unable to load asset: logos/SZN-logo.png. Error thrown Instance of 'ErrorDescription'.
Can you see anything wrong with what I have here?
Widget getImage() {
try {
return Image.asset(getLogo()
, errorBuilder:
(BuildContext context, Object exception, StackTrace? stackTrace) {
return const Text('');
}
);
}
catch (e) {
return const Text('');
}
}