【发布时间】:2020-07-17 06:21:28
【问题描述】:
所以我正在使用flutter web + cloud firestore
要让 Cloud Firestore 正常工作,我必须修改我的 index.html。问题是每次我运行时
flutter build web
它覆盖了我的 index.html,我必须手动重新添加所有必要的代码 sn-ps 才能让它再次工作。
我可以在不覆盖 index.html 的情况下运行 flutter build web 吗?
另一个相关问题是,当我将站点部署到 firebase 时,它工作正常,但是当我在本地运行此站点以进行测试时
flutter run -d chrome
当它在 chrome 上运行时,该站点再次使用全新的 index.html 没有必要的代码,因此它不起作用。我没有机会编辑 index.html 以应用必要的代码,因为它会立即构建和运行。
有解决办法吗?
【问题讨论】:
标签: flutter dart flutter-web