📜  从 firestore 到 dart 对象的单个文档 - Dart 代码示例

📅  最后修改于: 2022-03-11 14:48:06.384000             🧑  作者: Mango

代码示例1
Stream> getSomeoneCommentsList(
   {@required String sellerId}) {
  return _fbd
     .collection('comments')
    .where('sellerId', isEqualTo: sellerId)
    .snapshots()
    .map((qSnap) => qSnap.docs
        .map((doc) => VehicleCommentSessionModel.fromJson(doc.data()))
        .toList());
}