Firebase Crashlytics in 3 Steps - Flutter Tutorial

Firebase Crashlytics in 3 Steps - Flutter Tutorial

Firebase Crashlytics in 3 Steps - Flutter Tutorial

Zoom Clone Code Here:
Google SignIn Firebase Code Here:
Grey to Colorful Animation Code Here:

how to use crashlytics in firebase in 3 Steps

Step 1: Create your Firebase Project in the Firebase console and enable crashlytics

Firebase console:

Step 2: Install these 2 packages in our pubspec.yaml

Then let's go to main.dart and initialize FireBase

and add these 2 lines



await Firebase.initializeApp();



Step 3: initialize Firebase Crashlytics

so let's add this line to main()


FlutterError.onError = FirebaseCrashlytics.instance.recordFlutterFatalError;


That is for overriding FlutterError.onError  with FirebaseCrashlytics.instance.recordFlutterError

which will automatically catch all errors that are thrown within the Flutter framework. and sent it to the Firebase dashboard

All Done!!

We don't have to wait for a crash

Let's Force a test crash to check if working or not!!

so let's add this line to a button or in the initState




Stop and re-Run your app again, And wait 10 mins till the first data reach the Crashlytics dashboard of the Firebase console.

and as you see in the dash we are receiving crash errors


That is it for this article, If you have any issues or questions

please message me on Instagram or WhatsApp and I will reply




#buttons=(Accept !) #days=(14)

Our website uses cookies to enhance your experience. Learn More
Accept !