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刪除。