How to crash Flutter App for Android and iOS (to test Firebase Crashlytics)?
If you have the flutter_crashlytics
plugin, you can test it using
FirebaseCrashlytics.instance.crash();
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!";
You can find more info about dart exceptions in the language tour and if you want, you can create your own custom Exception type as explained in this SO answer
integrate firebase_crashlytics
Crashlytics.instance.crash();