且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

从登录用户创建的Firebase中读取数据-Flutter

更新时间:2023-12-01 15:48:28

这可能取决于数据的整理方式.仔细阅读以下内容: https://firebase.google.com/docs/firestore/manage-数据/结构数据

It might depend on how your data are oranized. Read through this: https://firebase.google.com/docs/firestore/manage-data/structure-data

一个简单的例子:

// snippet for pulling from data once it is there
await FirebaseFirestore.instance
  .collection("USERDATA")
  .doc(userID)
  .collection('DOCUMENTS')
  .get()

// one way you might supply the function that puts data up to firestore.
uploadToCloudStorage(
      userID: user.fAuthUser.uid, fileToUpload: File(filePath));