How to crash Flutter App for Android and iOS (to test Firebase Crashlytics)?
I want to test out crash report using
Firebase Crashlytics in my
Flutter App. I need to Fatal crash my
flutter app for both Android and iOS programmatically. Any idea?
You should be able to throw a Dart exception by doing this anywhere in your Flutter app:
throw Exception("This is a crash!");
Or by using an arbitrary object:
throw "This is a crash!";
Answered By – Xavi Rigau