| OLD | NEW |
| 1 Sky Style Guide | 1 Sky Style Guide |
| 2 =============== | 2 =============== |
| 3 | 3 |
| 4 In general, follow our [Design Principles](design.md) for all code. | 4 In general, follow our [Design Principles](design.md) for all code. |
| 5 | 5 |
| 6 | 6 |
| 7 Dart | 7 Dart |
| 8 ---- | 8 ---- |
| 9 | 9 |
| 10 In general, follow the [Dart style | 10 In general, follow the [Dart style |
| 11 guide](https://www.dartlang.org/articles/style-guide/) for Dart code, | 11 guide](https://www.dartlang.org/articles/style-guide/) for Dart code, |
| 12 except where that would contradict this page. | 12 except where that would contradict this page. |
| 13 | 13 |
| 14 Always use the Dart Analyzer. Do not check in code that increases the | 14 Always use the Dart Analyzer. Do not check in code that increases the |
| 15 output of the analyzer unless you've filed a bug with the Dart team. | 15 output of the analyzer unless you've filed a bug with the Dart team. |
| 16 | 16 |
| 17 Use assert()s liberally. | 17 Use assert()s liberally. |
| 18 | 18 |
| 19 | 19 |
| 20 Classes and Enums are named UpperCamelCase. Everything else (methods, | 20 Types (i.e. classes, typedefs (function signature definitions) and |
| 21 fields, variables, constants, enum values, etc) is lowerCamelCase. | 21 enums) are named UpperCamelCase. Everything else (methods, fields, |
| 22 Global double and string constants are prefixed with k. Prefer using a | 22 variables, constants, enum values, etc) is lowerCamelCase. Global |
| 23 static const in a relevant class than using a global constant. | 23 double and string constants are prefixed with k. Prefer using a static |
| 24 const in a relevant class than using a global constant. |
| 24 | 25 |
| 25 Don't name your libraries (no ```library``` keyword). Name the files | 26 Don't name your libraries (no ```library``` keyword). Name the files |
| 26 in ```lower_under_score.dart``` format. | 27 in ```lower_under_score.dart``` format. |
| 27 | 28 |
| 28 | 29 |
| 29 Class constructors and methods should be ordered in the order that | 30 Class constructors and methods should be ordered in the order that |
| 30 their members will be used in an instance's typical lifecycle. In | 31 their members will be used in an instance's typical lifecycle. In |
| 31 particular, this means constructors all come first in class | 32 particular, this means constructors all come first in class |
| 32 declarations. | 33 declarations. |
| 33 | 34 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 > ``` | 97 > ``` |
| 97 | 98 |
| 98 | 99 |
| 99 C++ | 100 C++ |
| 100 --- | 101 --- |
| 101 | 102 |
| 102 | 103 |
| 103 Java | 104 Java |
| 104 ---- | 105 ---- |
| 105 | 106 |
| OLD | NEW |