Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use cloud firestore in Flutter web app

I am creating a flutter web app ,I want to connect my flutter web project with cloud firestore, is there any to connect my project to cloud firestore

I have try import cloud_firestore: ^0.12.5+2 in pubspec.yaml.

Because op depends on cloud_firestore >=0.3.0 which requires the Flutter SDK, version solving failed.

like image 296
kin Avatar asked Dec 14 '22 11:12

kin


2 Answers

You can now use official cloud_firestore plugin in flutter web, just follow the instructions in readme page to integrate plugin.

like image 191
Devarsh Ranpara Avatar answered Dec 20 '22 02:12

Devarsh Ranpara


The FlutterFire plugin that you found only targets iOS or Android.

If you're targeting the web, use the firebase-dart plugin.

Also see a similar answer I gave yesterday here: Is there a Dart interface to Firestore - with API as in https://firebase.google.com/docs/firestore/quickstart?

like image 45
Frank van Puffelen Avatar answered Dec 20 '22 04:12

Frank van Puffelen