类
一、构造函数
Dart实现了多种类型的构造函数。
1.1 生成构造函数123456class Point { double x; double y; Point(this.x, this.y);}
1.2 默认构造函数
如果你不声明构造函数,Dart 会使用默认构造函数。默认构造函数是无参数且无名称的生成式构造函数。
1234class Point{ ...
阅读全文