Firebase Configuration

After Change package name now you need to config the firebase (firebase its a google service used to send notification and to allow the application login with google accounts)

Setup Firebase project

To create a new Firebase project you will need to go here.

  1. Click on “Add project” to create a new project.

2. Now, you have to enter a “Project name” and check the two checkboxes below. Then, click on “Create project”.

3. Now, wait for the creation to complete and click on “Continue”.

4. This will lead you to the “Project Overview”. From here you will be able to add Firebase to your Flutter project.

5. Click on the Android icon.

In this form, you have to first enter the “Android Package name”. You can get the android package name form your project directoryandroidappsrcAndroidManifest.xml. On the second line, there will be your package name. Just copy & paste in the form.

4. Now, you have to enter the “SHA-1 hash”. Just hover over the help (?) and click on See this page. This will take you to “Authenticating Your Client” page.

From here you will get the command to generate the SHA-1 hash. Paste this in your IDE terminal to get the SHA-1 hash. Just copy & paste this in the form.

5. Click on Register App.

6. This will take you to the second step from where you can download the “google-services.json” file and just drag & drop it in your project directoryandroid → app. Then, click on Next.

7. In the third step just follow the instructions add the code snippets accordingly in the desired position. Then, click on Next.

8. Finally, to complete the fourth step just run the app on your device and attempt a google sign in from the device for the first time.

Make sure that the internet connection of the device is turned on.

9. After completing this step, you will see that the “Continue to Console” button gets enabled and click on it to go to the console of the app.

  1. Go to Authentication PageUsers tab and click on “Set up sign-in method”.

2. Go to Cloud Firestore → click on “Create database".

Last updated