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});
}
原文地址:https://www.cnblogs.com/njcxwz/p/10067541.html