How to Setup Firebase for Flutter 2024 | Connect with Android, iOS & Web | Flutter with Firebase.

i Know hoW
i Know hoW
560 بار بازدید - 2 ماه پیش - How to Setup Firebase for
How to Setup Firebase for Flutter using firebase cli.
1. create a project in firebase.
2. download firebase cli (node.js).
3. set this path in Environment variable.👇
"
C:\Users\username\AppData\Local\Pub\Cache\bin
copy this and change username.
"
4. run firebase login.
5. dart pub global activate flutterfire_cli (you can get it when you create flutter project in firebase)
6. flutterfire configure --project=project name( you can get it when you create flutter project in firebase).
7. now select what kind of project you want to make( android, ios, macos, web)
8. now add required dependencies.

Now, you need to add this code in main.dart file.👇

WidgetsFlutterBinding.ensureInitialized();
 await Firebase.initializeApp(
   options: DefaultFirebaseOptions.currentPlatform,
 );
and make main function as async.

NB:
if you face problem for firebase login,
you can set this path in environment variable.👇
"
C:\Users\username\AppData\Roaming\npm
then delete npm.ps1 file
2 ماه پیش در تاریخ 1403/02/16 منتشر شده است.
560 بـار بازدید شده
... بیشتر