接口返回了一个IEntryListItem类型的值
我需要在IEntryListItem的基础上增加id等一些字段
需要怎么写?
比如
class IEntryListItemExpend extend IEntryListItem {
IEntryListItemExpend({
this.isNew;
})
bool isNew;
}
IEntryListItem res = dio()....
IEntryListItemExpend resExpend = res;
resExpend.isNew = true;
这样写会报错
type 'IEntryListItem' is not a subtype of type 'IEntryListItemExpend'
需要怎么写才能解决这个问题