Add Firebase to Your Flutter App with FlutterFire Plugins

Learn how to integrate the FlutterFire plugins Authentication, Cloud Firestore, Remote Config, Crashlytics, and Analytics in a Flutter app.

Firebase helps you develop, measure, improve, and grow your mobile app. It’s backed by Google and covers a wide range of services, including real-time database, authentication, crash monitoring, analytics, push notifications, and more. Firebase provides all these backend, platform-related tools as a service so you can focus more on building the app’s core features.

FlutterFire is a set of official plugins that enable you to implement Firebase services in your Flutter app. The stable version already offers a variety of critical plugins and more are expected to become available in the near future.

In this tutorial, we’ll demonstrate how to integrate some of the most useful FlutterFire plugins, including:

We’ll also walk through some practical examples so you can see these FlutterFire plugins in action.

Before we begin our tutorial, let’s break down how we’ll use each FlutterFire plugin in our example app:

FlutterFire Plugins Demo

We’re going to build a virtual playground game in which users authenticated via the Authentication plugin control a character jumping on a trampoline. The jump count will be synced to Cloud Firestore. We’ll use Remote Config to change the background without pushing the app update. Finally, we’ll handle important events and crashes using the Analytics and Crashlytics plugins, respectively.

Create and configure your Firebase project

The first step is to create a project in the Firebase console and configure the native Android/iOS and Flutter app to use the Firebase services.

To create a project in the Firebase console:

  1. Head to the Firebase console
  2. Click Add project
  3. Enter the project name and hit Continue
  4. Keep Enable Google Analytics for this project on and click Continue
  5. Select the Google Analytics account and hit Create project

Configure Google Analytics

#firebase #flutter

Add Firebase to Your Flutter App with FlutterFire Plugins