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:
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:
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。