70 字
1 分钟
代码规范
2021-11-18
2026-10-12
无标签

常见警告#

Name non-constant identifiers using lowerCamelCase.#

1

如上图,警告。这里不是 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