问题描述
当我运行命令:flutter build web =>时,我得到一个空白网页。如果我使用cloud_firestore :: 0.12.11或更旧的版本,那么一切运行都很好。
重现行为的步骤:
- 颤抖的医生。找不到问题。
- flutter运行-d chrome。该应用程序在本地浏览器上运行正常。
- 颤抖地建立网站。该应用程序运行并显示空白页面。
- 在pubspec.yaml中:删除依赖项cloud_firestore:应用程序运行正常。
- 在pubspec.yaml中:添加依赖项cloud_firestore:0.12.11(旧版本),该应用程序运行正常。
预期行为
- 我需要使用cloud_firestore:0.14.0 + 2,以便可以使用数据类型FirebaseFirestore。
解决方法
您还在使用其他firebase软件包吗?我发现firebase_auth
存在问题-包括黑屏。
确保您遵循《迁移指南》:https://firebase.flutter.dev/docs/migration/#plugin-changes
,问题出在库本身中的错误。