dart 命名规范

1.类型 首字母大写 譬如

abstract class Shape

2.变量 驼峰式命名,首字母小写
class Article {
String headUrl;
String user;
String action;
String time;
String title;
String mark;
String imgUrl;
int agreeNum;
int commentNum;

Article(this.headUrl, this.user, this.action, this.time, this.title, this.mark, this.agreeNum, this.commentNum, {this.imgUrl});
}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章