Setup Firebase Configuration

Follow the below steps to add your flutter app to firebase: We are going to add our flutter app to firebase using Firebase CLI but Firebase CLI needs node js to work on the operating system.

  • Install on windows:
    1. First, you need to download the Windows Installer (.msi) file from the official Node.js website. This MSI installer database carries a collection of installer files essential to install, update, or modify the existing Node.js version.
    2. Notably, the installer also carries the Node.js package manager (npm) file from the official Node.js website. This MSI installer database carries a collection of installer files essential to install, update, or modify the existing Node.js version.
    3. When downloading, select the correct version as per your operating system. For example, if you’re using a 64-bit operating system, download the 64-bit version, and if you’re using the 32-bit version, download the 32-bit version:
    4. app-installation
  • Begin the Installation Process
    1. Once you open and run the .msi file, the installation process begins. But you have to set a few parameters before running the installation process.
    2. Double-click on the installer file and run it. The installer will ask you to accept the Node.js license agreement. To move forward, check the “I accept” box and click Next:
    3. app-installation
    4. Then, select the destination where you want to install Node.js. If you don’t want to change the directory go with the Windows default location and click the Next button again.
    5. app-installation
    6. The next screen will show you custom setup options. If you want a standard installation with the Node.js default features, click the Next button. Otherwise, you can select your specific elements from the icons in the tree before clicking Next:
    7. app-installation
    8. Node.js offers you options to install tools for native modules. If you’re interested in these, click the checkbox to mark your preferences, or click Next to move forward with the default:
    9. app-installation
  • Run Node.js Installation on Windows
    1. Lastly — and this is the easiest part of all — click the Install button to begin the installation process:
    2. app-installation
    3. The system will complete the installation within a few seconds or minutes and show you a success message. Click on the Finish button to close the Node.js installer.
    4. app-installation
  • Verify Node.js Installation
    1. So the installation process is completed. Now, you have to check whether Node.js is successfully installed or not.
    2. To verify the installation and confirm whether the correct version was installed and enter the following command:
    3. Run Commands: Execute the following commands in your terminal:
    4. Node --version
    5. And to check the npm version run this command:
    6. npm --version
      app-installation

    Installing FlutterFire CLI

    You need to install the Firebase CLI because the FlutterFire CLI depends on it. Run the command below in the command line to install the Firebase CLI tool on your computer.

  • Run
  • npm install -g firebase-tools

    To run this command, you need to have Node.js installed on your computer

    Firebase Configuration

    Configuration Step:

    1. Go to Firebase Console. and login with your Gmail account.
    2. Create a project using the screenshot bellow On the welcome screen, click the Create a project button. A new modal will appear. Insert your project name, read & accept firebase terms and click Continue.
    3. app-installation
      app-installation
    4. In the next step, you’ll be asked if you want to set up Google Analytics. You can skip this part just uncheck the option and Click Continue.
    5. app-installation
      app-installation

      Upon successful creation, click Continue. You get redirected to your project’s console dashboard

    6. Add your flutter project to your firebase Follow the steps below:
    7. app-installation
    8. Then log in to Firebase using Firebase CLI the steps below: Run:
    9. firebase login
    10. From any directory, run:
    11. dart pub global activate flutterfire_cli
    12. Then, at the root of your Flutter project directory, Run:
    13. flutterfire configure --project=test-project-5607f

      Make sure you have selected the right project name.

      app-installation
      app-installation
      app-installation

      The next step is to select the platforms FlutterFire should configure for. (Use the arrow keys to make your selections and the space key to select or deselect platforms.) if there is any configuration is already exists press y to accept. After the configuration is completed successfully, a firebase_options.dart file is generated along with some .json files. The output should look similar to the image below.

      app-installation

      You can also check your Firebase console to confirm that the project was created and configurations were done for all the platforms you specified.

    Free Support
    • Server Issues
    • DB Migration Issues
    • Configuration Issues
    • Project Issues
    • Reset Purchase Code (max 1 time)
    Unsupported
    • Environment Setup
    • Deploy on Localhost
    • After Code Modification
    Paid Support
    • Installation
    • APK build
    • iOS build
    • Update Template
    • Adding New Feature
    • API Integration and many more...