问题描述
class Foo {
const Foo(this.message);
final String message;
}
class Bar extends Foo {
const Bar(String message,this.another,) : super(message);
final String another;
}
void main() {
const Foo _foo = Bar('hello','world');
const Bar _bar = _foo;
print(_bar.another);
}
这是我们每Widget
遇到的典型行为,
是否要重铸整个对象 ?
解决方法
如果没有人打电话,它会因树木摇摇欲坠而消失。