【发布时间】:2021-11-16 20:06:24
【问题描述】:
我正在尝试从 Firebase 检索对象数组并将其作为列表存储在 Flutter Object 中。
这是集合,Firebase,
这是模型类
class Merchant {
String shopName;
String address;
String description;
String thumbNail;
LatLng locationCoords;
Merchant(
{this.shopName,
this.address,
this.description,
this.thumbNail,
this.locationCoords});
}
final List<Merchant> merchant = []; // Map it to This List
我想把它映射到上面的这个列表中
final List<Merchant> merchant = [];
【问题讨论】:
-
您查看过 Flutter 的 Firestore 文档吗?你试过什么?
-
是的,我似乎不知道如何从文档中映射它
标签: firebase flutter dart google-cloud-firestore