How to Configure Firebase Firestore settings with Flutter?

Posted by Andre Scott | Updated on

Want to Configure Firebase Firestore settings with Flutter?  Follow the below steps to Configure Firebase Firestore settings with Flutter.

Step 1: Create a Firebase project

Before you can add Firebase to your Flutter app, you need to create a Firebase project to connect to your app. Visit Understand Firebase Projects to learn more about Firebase projects.

Create a Firebase project

Step 2: Register your app with Firebase

  1. In the center of the Firebase console’s project overview page, click the iOS icon (plat_ios) to launch the setup workflow.If you’ve already added an app to your Firebase project, click Add app to display the platform options.
  2. Enter your app’s bundle ID in the iOS bundle ID field.Find this bundle ID from your open project in XCode. Select the top-level app in the project navigator, then access the General tab. The Bundle Identifier value is the iOS bundle ID (for example, com.yourcompany.ios-app-name).
  3. (Optional) Enter other app information as prompted by the setup workflow.
  4. Click Register app.

Step 3: Add a Firebase configuration file

  1. Click Download GoogleService-Info.plist to obtain your Firebase iOS config file (GoogleService-Info.plist).
    • You can download your Firebase iOS config file again at any time.
    • Make sure the config file is not appended with additional characters, like (2).
  2. Using XCode, move the file into the Runner/Runner directory of your Flutter app.
  3. Back in the Firebase console setup workflow, click Next to skip the remaining steps.
  4. Continue to Add FlutterFire plugins.

Step 4: Add FlutterFire plugins

Flutter uses plugins to provide access to a wide range of platform-specific services, such as Firebase APIs. Plugins include platform-specific code to access services and APIs on each platform.

Firebase is accessed through a number of different libraries, one for each Firebase product (for example: Realtime Database, Authentication, Analytics, or Storage). Flutter provides a set of Firebase plugins, which are collectively called FlutterFire.

Since Flutter is a multi-platform SDK, each FlutterFire plugin is applicable for both iOS and Android. So, if you add any FlutterFire plugin to your Flutter app, it will be used by both the iOS and Android versions of your Firebase app.

Be sure to check the FlutterFire docs for the most up-to-date list of FlutterFire plugins.

Reference:

https://firebase.google.com/docs/flutter/setup


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers