问题
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