我一直在尝试在flutter中创建一个应用程序,即使应用程序被终止,它也会将用户的位置数据发送到Firestore数据库。此插件可以很好地在应用程序终止时获取位置数据:https://github.com/rekab-app/background_locator 问题是我无法在这个插件的'callback‘函数中更新Firestore(No implementation found for method Document
我必须使用事务来设置和更新Firestore中的某些数据。如果旧数据已经存在,我想合并新数据。这在没有事务的情况下是可能的,但是有了它们,我似乎无法做到这一点,即使它说你可以做到。从FlutterFirestore实现中,我可以看到以下文档:
/// Writes to the document referred to by the provided [DocumentReference我在谷歌上搜索过SetOption