How to use FlutterFire in Flutter 2023

Alvin Aprianto
2 min readFeb 1, 2023

--

Firebase is a Google-backend application development software that enables developers to develop iOS, Android and Web apps. Firebase provides tools for tracking analytics, reporting and fixing app crashes, creating marketing and product experiment. FlutterFire is a set of Flutter plugins which connect your Flutter application to Firebase.

In this article we will be learning about how to use or setup FlutterFire in Flutter. Calm down, because this will be very easy!

Installation #1

First of all, we have to install Flutter Fire CLI

You can install the Firebase CLI using a method that matches your operating system, experience level, and/or use case. Regardless of how you install the CLI, you have access to the same functionality and the firebasecommand. But in this article I will recommend the installation according to each operating system.

Windows

On this operating system i will recommend install with standalone binary. You can download the binary file on the link below :

https://firebase.tools/bin/win/instant/latest

Mac & Linux

Meanwhile, for this operating system, I suggest installing it with automatic install script

curl -sL https://firebase.tools | bash

Login to Firebase #2

Log into Firebase using your Google account by running the following command:

firebase login

Activate FlutterFire #3

Install / activate the FlutterFire CLI by running the following command from any directory:

dart pub global activate flutterfire_cli

Configure Flutter Fire #4

  1. Configure Flutter Fire inside your flutter project:
flutterfire configure

2. Then we can following step by command line, from create firebase project until choose firebase services that you want to use.

Install Package #5

Install package firebase core:

flutter pub add firebase_core

Initialize Firebase #6

In your lib/main.dart file, initialize Firebase using the DefaultFirebaseOptionsobject exported by the configuration file:

Conclusion

In this article we learned about how to use FlutterFire in Flutter. We have learned from the start of installation to its use. And everything is very easy as I previously said. I hope this article is helpfull and see you in the next article! Goodbye! 🤙🏻

--

--