📜  Flutter 构造函数默认值 - TypeScript 代码示例

📅  最后修改于: 2022-03-11 14:48:11.989000             🧑  作者: Mango

代码示例1
class Customer {
  String name;
  int age;
  String location;

  Customer(this.name, [this.age, this.location = "US"]);

  @override
  String toString() {
    return "Customer [name=${this.name},age=${this.age},location=${this.location}]";
  }
}