In this post, we are going to show you how to integrate Firebase core in Flutter App. Firebase core is necessary to use products of Firebase such as Firestore Database, Firebase Messaging, Realtime Messaging. See the details below:
The first step is to create App in the Firebase console. Go to the Firebase console and create a new app.
In the Firebase console, click on "Add project" add a new app. You have to give the name of your app. After creating the project, you will be redirected to the project console. If you haven't redirected, then click on the created project from the list shown in Firebase Console.
Select the platform you are integrating into. If you are integrating into the Android app, click on the "Android" icon. If you are integrating into iOS, click on the iOS icon. When you click on the integration icon, you will have to pass the package name of your project. You can get the package name from AndroidManifest.xml file
Add this package name to the Firebase console.
After registration of your app, you will be provided "google-services.json" file, download this file and move it to Androd/app folder.
If you are integrating into iOS, click on the "iOS" icon, and follow the same step, you will be provided with the file "GoogleService-Info.plist", you have to download this file and move it to the folder where info.plist is located.
Now you have to add google services to your project. Follow the integration instructions shown in the console panel. For example, we had instructed to do the following things for Android integration.
For, iOS the instruction may look like this:
Follow the instructions and make changes to your project. Be sure, you have done everything as mentioned. After this step, Firebase SDK is integrated into your app.
After integrating Firebase, you have to use different packages to integrate different products of Firebase.
In this way, you can integrate Firebase in Flutter App.