How to use cloud firestore in Flutter web app

孤街浪徒 提交于 2019-12-08 05:32:10

问题


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.


回答1:


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?




回答2:


maybe you need add dependencies: firebase_web: ^5.0.9 to your pubspec.yaml. this page can help you https://pub.dev/packages/firebase_web



来源:https://stackoverflow.com/questions/57168080/how-to-use-cloud-firestore-in-flutter-web-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!