【发布时间】:2019-09-27 07:39:08
【问题描述】:
我正在尝试从 firestore 获取一些格式化数据,但出现此错误:
引发了另一个异常:类型“_InternalLinkedHashMap”不是类型转换中“Store”类型的子类型
这是我的课程代码。
class StoreInterface {
String name;
String address;
}
class Store{
Store data;
Store.fromDocument(DocumentSnapshot snapshot){
StoreInterface data = snapshot.data as StoreInterface
}
}
【问题讨论】: