我正在尝试创建一个与cloud_firestore连接的简单的flutter应用程序。我使用的是支持空安全的版本。我是根据文档示例完成的。但是我在编译和执行代码时遇到了这个错误。- 'DocumentSnapshot' is from 'package:cloud_firestore/cloud_firestore.dart' ('/C:/src/flutter/.pub
我必须使用事务来设置和更新Firestore中的某些数据。如果旧数据已经存在,我想合并新数据。这在没有事务的情况下是可能的,但是有了它们,我似乎无法做到这一点,即使它说你可以做到。从FlutterFirestore实现中,我可以看到以下文档:
/// Writes to the document referred to by the provided [DocumentReference我在谷歌上搜索过