📅  最后修改于: 2022-03-11 14:48:08.529000             🧑  作者: Mango
// available types
class BaseType {}
class DerivedType extends BaseType {}
class BaseClass {
final Type prop;
BaseClass(this.prop) {
// can be either BaseType or DerivedType
print(prop);
}
}
class DerivedClass extends BaseClass {
DerivedClass(BaseType prop) : super(prop);
}