Skip to content

Instantly share code, notes, and snippets.

@jscarl
Created March 28, 2024 12:08
Show Gist options
  • Save jscarl/06e0d693fca9e3aae404bab3654eeca3 to your computer and use it in GitHub Desktop.
Save jscarl/06e0d693fca9e3aae404bab3654eeca3 to your computer and use it in GitHub Desktop.
Hanlde 404 image from network debug print
void main() async {
FlutterError.onError = (FlutterErrorDetails details) {
if (details.library == 'image resource service' &&
details.exception.toString().contains('404')) {
print('Suppressed cachedNetworkImage Exception');
return;
}
FlutterError.presentError(details);
};
runApp(const MyApp());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment