The Effective Dart style guide and its naming conventions provide a set of guidelines for writing Dart code that is easy to read, easy to change, and easy to maintain. The guidelines are intended to be used by all Dart users, whether you are writing a small program or a large-scale application. These guidelines help set a standard across teams and projects.
Practice
- Use
UpperCamelCasefor classes, enums, typedefs, extensions and type parameters. - Use
lowerCamelCasefor variable names, function names, parameter names, and named constants. - Use
lowercase_with_underscoresfor packages, directories, and source files. - Start a name with an underscore (
_) only to make it private to its library. - Run
dart formatto format your code the standard way.