Let's now see the steps required to configure Firebase for an Android device. Perform the following steps:
- Open the file at the path <project-name>/android/app/build.gradle.
-
Retrieve the applicationId key in the defaultConfig node, delete the com.example.firebase_demo value, and add your own domain (or your name and surname); for example it.softwarehouse.firebase_demo (you will require a name that uniquely identifies your app).
-
From the Firebase project's overview page, click the Android button under the Get started by adding Firebase to your app button at the top of the screen.
- Set the package name to the applicationId you have chosen and the nickname to Firebase Flutter, as shown in the following screenshot:
- Click on the Register app button.
-
Download the google-services.json file.
-
Move the file into the android/app folder of your project.
- In the build.gradle file in the app folder, add the following command under the apply...