-
Notifications
You must be signed in to change notification settings - Fork 4
Firebase API
DanPeled edited this page Aug 26, 2024
·
1 revision
In order to link your scouting site to your own database:
- Create a new Firebase project by navigating to the firebase website, and pressing the
Get Startedbutton and then pressingCreate a project. - In the
Project overviewpage, press theWeboption in order to configure your project's web connection. - Navigate to your project settings and keep the
firebaseConfigdetails. e.g
firebaseConfig = {
apiKey: "myAPIKey",
authDomain: "myAuthDomain",
projectId: "myProjectId",
storageBucket: "myStorageBucket",
messagingSenderId: "myMessagingSenderId",
appId: "myAppId",
measurementId: "myMeasurmentId"
};- Press the
Buildmenu presented in the left side of the page, and chooseFirestore Database. - Press the
Create databasebutton and configure your database. - Go to the
lib/services/firebase/firebase_api.dartfile and modify the following lines to use your firebase project details:
Future<void> initialize() async {
// ...
app = await Firebase.initializeApp(
options: FirebaseOptions(
apiKey: "<your apiKey>",
appId: "<your appId>",
messagingSenderId: "<your messaginSenderId>",
projectId: "<your projectId>",
storageBucket: "<your storage Bucket>",
),
);
// ...
}Firebase documentation can be found here