Firebase服务冲突



有时,当我使用firebase firestore和firebase存储依赖项来构建项目时,我的应用程序会崩溃,这是偶发的,我该如何解决?我需要使用一些特定的版本吗?

我的pubspec.xml

dependencies:
flutter:
sdk: flutter
path_provider:
firebase_auth:
cloud_firestore:  
firebase_storage:  <------ The crashes begun when I add this firebase_storage dependencie
sqflite:
flutter_map: "^0.1.4"
date_format: "^1.0.4"
image_picker: 
google_maps_flutter:
git:
url: git://github.com/flutter/plugins
path: packages/google_maps_flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2

我认为当我调用时应用程序崩溃

Firestore.instance.collection("users").document(uid).get().then((DocumentSnapshot documentSnapshot){
.....
.....
}

我使用这个解决了我的问题

await Firestore.settings(timestampsInSnapshotsEnabled: true);

GitHub问题

GitHub示例

最新更新