Before getting started ๐
Firebase offers many services, including App Distribution, Authentication, Crashlytics, and Analytics.
In this post, let's look at how to register Flutter-based apps with Firebase together.
1. Configuring the Firebase project ๐
Create a Firebase project and register the apps.
To create the project, sign in with Google at the
Firebase consoleโ and click Create a project.
Creating a Firebase project
Creating a Firebase project
Then click the ๊ณ์ (Continue) button to create it.
2. Registering the apps ๐
After creating the project, add an app from its overview screen.
Since we are using Flutter, choose the Flutter app option.
Selecting Flutter
2.1. Preparing the workspace ๐
On the following screen, complete step 1 if you do not have a Flutter project, or start from step 2 if you already have one.
Install Flutter CLI and the Flutter SDK in order, then create a Flutter project.
Preparing the workspace
2.2. Installing and running FlutterFire CLI ๐
Install FlutterFire CLI and connect the project.
Installing FlutterFire CLI
dart pub global activate flutterfire_cli
flutterfire configure --project= { ํ๋ก์ ํธ ์ด๋ฆ}
2.3. Initializing Firebase and adding plugins ๐
Check whether the following Firebase initialization code has been added to main.dart, and add it if necessary.
/lib/main.dart import 'package:firebase_core/firebase_core.dart' ;
import 'firebase_options.dart' ;
// ...
await Firebase . initializeApp (
options : DefaultFirebaseOptions .currentPlatform,
);
Firebase initialization code
Firebase integration is now complete.
You can see that both apps have been registered with Firebase together.
Now try the various services available in the Firebase console.