Skip to content

Firebase

This module streamlines the integration of Firebase Cloud Messaging (FCM) into your LiWE3 Flutter app.

Setup

  1. Create your Firebase project at Firebase Console.

a. Click on "Add Project". b. Enter your project name.

  1. Navigate to the Project Settings.

a. Click on the gear icon in the top left corner. b. Click on "Project Settings".

  1. Add your Android and iOS apps to the project.

a. Click on the Android or iOS icon. b. Follow the instructions to add your app. c. Download the google-services.json or GoogleService-Info.plist file and place it in the android/app or ios/Runner directoryflutter create --platforms android ..

  1. Generate firebase_options.dart file.

a. First of all, be sure to have Flutter CLI installed. For linux do:

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

b. Then login using your Google account:

firebase login

c. (optional) Test if you can see your projects:

firebase projects:list

d. Add the flutterfire binary to your project:

dart pub global activate flutterfire_cli

e. Generate the file:

flutterfire configure
  1. Enable Firestore and Firebase Cloud Messaging in your Firebase project.

a. Click on "Firestore Database" in the left menu.

b. Click on "Create Database".

c. Click on "Start in test mode".

d. Click on "Enable".