It's crucial for any mobile application to detect crashes. That’s how you are notified that something is not working as it should.
But do you catch ALL the crashes?
I will showcase how to do it with Firebase Crashlytics, but you can easily replace it with any other crash reporter.
Firstly, you should catch all the crashes you didn’t catch somewhere in your code. That covers exceptions in the Flutter.
Then you need to catch all the crashes in Zone that were not caught by the Flutter Framework. Handling crashes in Zone covers exceptions in the native layer.
Finally, you need to catch all the crashes in the Isolate. Handling crashes in Isolate covers exceptions in Dart. Remember that if you have created more Isolates, you should also add handling to them.
Perfect! Now you can be sure that all the crashes in your code will be caught and reported.
PS. I wish you as few crashes as possible 🤞