【发布时间】:2019-07-04 01:28:39
【问题描述】:
我有A班:
class A{
String title;
String content;
IconData iconData;
Function onTab;
A({this.title, this.content, this.iconData, this.onTab});
}
我如何创建类 B 来扩展类 A 并使用如下附加变量:
class B extends A{
bool read;
B({this.read});
}
试过了,但没用
let o = new B(
title: "New notification",
iconData: Icons.notifications,
content: "Lorem ipsum doro si maet 100",
read: false,
onTab: (context) => {
});
【问题讨论】: