How to use Firebase with Flutter

Ismail R.
3 min readNov 16, 2021

--

  1. Solution name.

Firebase

Google’s Flutter SDK can be used to develop apps that give native UI experience for both Android and iOS platforms. To write apps using Flutter, you have to use Dart programming language.

  1. Associated libraries and integration, APIs, …

Firebase can be integrated with various applications such as google analytics or for example with bigquery which is a data analysis tool all this thanks to the api that can be created in the google cloud console

  1. Details of their usage and storage.

Firebase is a scalable tool that is, you pay for the use of the service, for example if you send notifications to your users, pay for each notification ($ 0.009).

  1. Links to official web pages or tutorials.

5. How to use.

Create Firebase Project

  1. Create a firebase project in firebase console.

https://console.firebase.google.com

2. Complete platform specific configuration

iOS

  • Register IOS app to firebase, iOS bundle Id must be same in Xcode project and on firebase console.
  • Download configuration files for your app and add it to your project folder.
  • Add firebase dependencies to your project

Android

  • Register you android app. Use package name in the project on firebase console.
  • Download the config file GoogleService-Info.plist and put it in the app module root directory.

Create Flutter project

  1. Use the flutter create command to create a new project.
$ flutter create flutter_with_firebase

2. Open ios/Runner.xcworkspace. Keep same Bundle Identifier in xcode project as defined on the firebase console and save GoogleService-info.plist in Runner folder

3. In your IDE or editor, open the file pubspec.yaml. Add dependency for firebase_database and save the file.

dependencies:
flutter:
sdk:
flutter
firebase_database: 1.0.3

4. In your IDE or command line with its current directory set to your Flutter app directory, run the following command.

flutter packages get

--

--

Ismail R.
Ismail R.

Written by Ismail R.

Early passion for computers led to a professional focus on aligning business with IT. Balancing academic and practical experience, especially in cybersecurity.

No responses yet