Setup Firebase Project

Create Firebase Project:

From within the Firebase dashboard, select the “Create new project” button and give it a name:

Next up, we’re given the option to enable Google Analytics. It isn’t directly necessary for what we’re trying to do, so do whatever feels right for your use-case here.

Assuming that we’re using Google Analytics, we’ll need to review and accept the terms and conditions prior to project creation.

Setup Local Environment:

First of all, you need to have Node.js installed. You can download and install from NodeJS Official website.

To make it installed run node -v and version must be at least the version v12.x.x or higher.

node -v
> v16.13.2  # The version must be at least v12.x.x or higher

After we will install Firebase CLI in order to init a new project and setup functions feature. You can install it globally using npm:

npm install -g firebase-tools

You can verify if it is correctly installed whit the command:

firebase --version
> 10.1.2

We need to login with our terminal.

firebase login

This will open browser tab and authenticate the firebase tool.

To verify that you logged in, run:

firebase login:list
> Logged in as youremail@gmail.com

Use FlutterFire CLI:

Install flutterfire Cli using dart pub:

dart pub global activate flutterfire_cli

Run configure command and select a Firebase project and platforms:

flutterfire configure

Setup Firestore

1. Select Cloud Firestore tab and click on create database

2. Select test mode then hit Next

3. Select region that suite you.

Setup Firebase Storage

1. Select storage tab

2. Add security rules like show below

Last updated