## Dart编程实例 - 命名构造函数```dartvoid main() { Car c1 = new Car.namedConst(E1001); Car c2 = new Car();} class Car {
## Dart编程实例 - This 关键字```dartvoid main() { Car c1 = new Car(E1001);} class Car { String engine; Car(String engine) { this.engine = engine; print(T
## Dart编程实例 - dart getters 和 setters```dartclass Student { String name; int age; String get stud_name { return name; } void set stud_name(String na
## Dart编程实例 - 继承的类型```dartvoid main() { var obj = new Leaf(); obj.str = hello; print(obj.str);} class Root { String str;} class Child extends Root {}
## Dart编程实例 - 类继承```dartvoid main() { Child c = new Child(); c.m1(12);}class Parent { void m1(int a){ print(value of a ${a});}} class Child extends Parent {
## Dart编程实例 - 方法覆盖```dartimport dart:io;void main() { Child c = new Child(); c.m1(12);}class Parent { void m1(int a){ print(value of a ${a});}}class Chi
## Dart编程实例 - Static 关键字```dartclass StaticMem { static int num; static disp() { print(The value of num is ${StaticMem.num}) ; }} void main() { Sta
## Dart编程实例 - Super 关键字```dartvoid main() { Child c = new Child(); c.m1(12);}class Parent { String msg = message variable from the parent class; void m1(int a){
## Dart编程实例 - Object```dartclass Student { void test_method() { print(This is a test method); } void test_method1() { print(This is a test me
## Dart编程实例 - 级联操作符 (..)```dartclass Student { void test_method() { print(This is a test method); } void test_method1() { print(This is a test method