【问题标题】:How to retrieve data from List stored as a field of document/collection in Cloud Firestore?如何从存储为 Cloud Firestore 中文档/集合字段的列表中检索数据?
【发布时间】:2021-09-28 21:19:43
【问题描述】:

[{},{},{},{}] enter image description here

I am trying something like this

【问题讨论】:

    标签: firebase flutter google-cloud-firestore flutter-layout flutter-listview


    【解决方案1】:

    您正在查询Users 集合而不是QuizHistory。如果你想访问地图中的特定字段,你可以为它定义一个模型类,或者,如果你想手动完成,你可以这样做:

    Text(snapshot.data['History'][index]['std'])
    

    【讨论】:

      猜你喜欢
      • 2019-09-23
      • 1970-01-01
      • 2020-09-24
      • 1970-01-01
      • 2019-12-28
      • 2021-11-04
      • 2021-02-25
      • 2018-04-14
      相关资源
      最近更新 更多