是否有Dart与Firestore的接口-使用https://firebase.google.com/docs/firestore/quickstart中的API? [英] Is there a Dart interface to Firestore - with API as in https://firebase.google.com/docs/firestore/quickstart?

查看:49
本文介绍了是否有Dart与Firestore的接口-使用https://firebase.google.com/docs/firestore/quickstart中的API?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此Firestore文档

This Firestore document

https://firebase.google.com/docs/firestore/quickstart

显示10种以上语言的示例,但不显示Dart.

Shows samples of 10+ languages but not Dart.

我发现,有一个

https://pub.dev/packages/cloud_firestore

似乎是Flutter包与Firestore的接口.两个问题:

which appears to be a Flutter packageinterfacing Firestore. Two questions:

  1. https://pub.dev/packages/cloud_firestore 中的软件包是否可以是从服务器端Dart使用的,还是取决于Flutter中的某些功能?

  1. Can the package in https://pub.dev/packages/cloud_firestore be used from server side Dart, or does in depend on something in Flutter?

它的API是否等同于 https://firebase.google中描述的API.com/docs/firestore/quickstart

Is it's API equivalent to that described in https://firebase.google.com/docs/firestore/quickstart

推荐答案

有两个主要插件可让您从Dart代码访问Firestore:

There are two main plugins that allow you to access Firestore from Dart code:

  1. FlutterFire插件.如果您要通过Flutter应用定位iOS或Android,请使用此插件,因为它是Firebase适用于这些平台的本机SDK的包装.
  2. firebase-dart 插件.如果您要通过Flutter应用定位网络,请使用此插件.
  1. The FlutterFire plugin. Use this plugin if you're targeting iOS or Android with your Flutter app, as it is a wrapper around Firebase's native SDKs for those platforms.
  2. The firebase-dart plugin. Use this plugin if you're targeting Web with your Flutter app.

没有比这两个插件更正式的插件了,因为它们分别是Flutter和Firebase组织的一部分.

There are no plugins that are more official than these two, as they are part of the Flutter and Firebase organizations respectively.

这篇关于是否有Dart与Firestore的接口-使用https://firebase.google.com/docs/firestore/quickstart中的API?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆