【Dart 学习】不定参数 及 参数语法糖写法

class test{
int a ;
String b ;
String c ;
test(this.a,this.b,{this.c});
}

1.构造时使用语法糖,那么使用this关键字。
2.在最后使用分号。没有主方法体。
3.不定参使用大括号括起。
调用
var clz = test(1, "111",c:"dsfsd");

4.调用时不定参数要指明参数名 c:
原文地址:https://www.cnblogs.com/mamamia/p/13679815.html