09.代码规范

Name non-constant identifiers using lowerCamelCase.

如上图,警告。这里不是 const 不能使用大写开头的驼峰。

DO name non-constant identifiers using lowerCamelCase.

Class members, top-level definitions, variables, parameters, named parameters and named constructors should capitalize the first letter of each word except the first word, and use no separators.

GOOD:

var item;

HttpRequest httpRequest;

align(clearItems) {
  // ...
}

https://dart-lang.github.io/linter/lints/non_constant_identifier_names.html

Last updated