How to connect flutter App with google firebase | Realtime database setup Explained

How to connect flutter App with google firebase | Realtime database setup Explained

Mayank's quick support

54 года назад

1,077 Просмотров

Hello, in this video I'll demonstrate how to properly link a flutter Android app to the Google Firebase cloud. The firebase initialization for real-time databases will be coded using the most recent syntax.

Also here are some tips to make this process work without any error :

Tip 1 : Install flutter before performing this process in your system
Tip 2 : If you are using physical device as your emulator then make sure to have internet connection in it.
Tip 3 : While adding App to firebase make sure the json file must be in "google-services.json" naming format only .This "google-services.json(1)" 👈format will not work
Tip 4 : While setting up Realtime Database If you are selecting "Start in Test Mode" Then your database will be activated only for a month so to change it forever Just go to Rules and change to these :
{
"rules": {
".read": "true", //
".write": "true", //
}
}

In android/app/build.gradle file add these :

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'com.google.gms.google-services'

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation platform('com.google.firebase:firebase-bom:31.1.0')
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'com.google.android.material:material:1.7.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'com.google.firebase:firebase-database:20.1.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.4'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0'
}

In android/build.gradle file add these :

dependencies {
classpath 'com.google.gms:google-services:4.3.13'
}

In pubspec.yaml file add these :

dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.2
firebase_database: ^10.0.6
firebase_core: ^2.3.0

And run "flutter pub get" command in terminal after saving it .

link to firebase database pub dev : https://pub.dev/packages/firebase_database
link to firebase core pub dev :
https://pub.dev/packages/firebase_core
link to google firebase console :
https://firebase.google.com/

00:00 Intro
00:10 Flutter new project
01:05 Creating firebase project
02:00 Adding firebase to android app
05:10 Creating realtime database in firebase
05:45 Adding pub.dev packages in pubspec.yaml file
07:20 Creating demo app
13:45 Active realtime database

💖 Do not forget to leave a subscription and share it with your friends if you find it useful thanks !
Subscribe to the channel at the link : https://www.youtube.com/channel/UCoZX39SxhaLkfnq4r1q95ig

Follow me on Instagram : https://www.instagram.com/scarrrrrr____/

#google #firebase #realtimedatabase #flutter #androidapp

Тэги:

#realtime_database_firebase #how_to_integrate_firebase_in_flutter_app #how_to_connect_flutter_app_with_firebase_realtime_database #how_to_setup_firebase_project #how_to_create_realtime_database_in_firebase #google_firebase_setup #how_to_connect_firebase_to_android_studio #how_to_connect_firebase_database_in_android_studio #how_to_connect_firebase_with_flutter #how_to_connect_firebase_to_flutter_app #setup_realtime_database_firebase #how_to_create_realtime_database #vscode_flutter
Ссылки и html тэги не поддерживаются


Комментарии: