Dart编程实例 - 构造函数
void main() {
Car c = new Car('E1001');
}
class Car {
Car(String engine) {
print(engine);
}
}
void main() {
Car c = new Car('E1001');
}
class Car {
Car(String engine) {
print(engine);
}
}