【发布时间】:2019-05-15 04:18:22
【问题描述】:
我正在开发一个 Flutter 应用程序,我想在其中连接到 Firebase 以使用数据库。谷歌的文档说我需要分别运行 Android 和 IOS 的设置说明,并要求提供很多我还没有的信息,因为该应用程序正在开发中。因为 Flutter 是跨平台的,所以我假设有一种方法可以设置 Firebase,而不需要这个烦人的过程。在 React Native 中,我很容易使用
static firebaseConfig = {
apiKey: "xxxxx",
authDomain: "xxxxx",
databaseURL: "xxxxx",
projectID: "xxxxx",
storageBucket: "xxxxx",
messagingSenderID: "xxxxxx"
}
...
if(!this.firebaseClient.apps.length){
this.firebaseClient.initializeApp(this.firebaseConfig);
}
return this.firebaseClient.auth();
和 Firebase 模型。有什么建议吗?
【问题讨论】:
标签: android ios firebase dart flutter