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.
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 directory β android β app β src β AndroidManifest.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 directory β android β 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.

Go to Authentication Page β Users tab and click on βSet up sign-in methodβ.

2. Go to Cloud Firestore β click on βCreate database".




Last updated
Was this helpful?