[英]how to setup Flutter Firebase desktop application
How do I set flutter to work with firebase functions like firestore, storage, and authentication?如何设置 flutter 以使用 firebase 功能,如 Firestore、存储和身份验证?
Firebase.initializeApp()
Your question is not clear but if you are asking how to add firebase dependencies;您的问题不清楚,但如果您问如何添加 firebase 依赖项; you can get packages from pub.dev .
你可以从pub.dev获取包。
And in any one of them;并且在其中任何一个中; click the installing tab and use this code: flutter pub add xxx(depends on the package you use) for example for firebase auth:
单击安装选项卡并使用此代码:flutter pub add xxx(取决于您使用的 package)例如 firebase 身份验证:
flutter pub add firebase_auth
Do not add dependencies directly to pubspec.yaml because it will make some mismatch with other packages.不要将依赖项直接添加到 pubspec.yaml 中,因为它会与其他包产生一些不匹配。 when you use flutter pub add xxx you don't get any problem with the harmony of dependencies.
当您使用 flutter pub add xxx 时,您不会对依赖关系的协调产生任何问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.