我正在使用以下代码使用DART/Ffltter更新Cloud Firestore集合.
final docRef = Firestore.instance.collection('gameLevels');
docRef.document().setData(map).then((doc) {
print('hop');
}).catchError((error) {
print(error);
});
我试图获取在将文档添加到集合时创建的DocumentID,但(Doc)参数返回为空.我以为这应该是一个文件引用?
因为它是空的,所以我显然不能使用doc.document ID.
我做错了什么?