Dart编程实例 - 继承的类型 Dart编程实例 - 类继承 Dart编程实例 - 类继承 Dart编程实例 - 继承的类型 void main() { var obj = new Leaf(); obj.str = "hello"; print(obj.str); } class Root { String str; } class Child extends Root {} class Leaf extends Child {} //indirectly inherits from Root by virtue of inheritance Dart编程实例 - 类继承 Dart编程实例 - 类继承