| OLD | NEW |
| 1 --- | 1 --- |
| 2 layout: article | 2 layout: article |
| 3 title: "Dart Style Guide" | 3 title: "Dart Style Guide" |
| 4 rel: | 4 rel: |
| 5 author: bob-nystrom | 5 author: bob-nystrom |
| 6 description: "Follow these guidelines for consistent, readable Dart code." | 6 description: "Follow these guidelines for consistent, readable Dart code." |
| 7 has-permalinks: true | 7 has-permalinks: true |
| 8 article: | 8 article: |
| 9 written_on: 2011-10-27 | 9 written_on: 2011-10-27 |
| 10 updated_on: 2014-10-27 | 10 updated_on: 2014-10-27 |
| (...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 634 final urlScheme = new RegExp('^([a-z]+):'); | 634 final urlScheme = new RegExp('^([a-z]+):'); |
| 635 | 635 |
| 636 class Dice { | 636 class Dice { |
| 637 static final numberGenerator = new Random(); | 637 static final numberGenerator = new Random(); |
| 638 } | 638 } |
| 639 {% endprettify %} | 639 {% endprettify %} |
| 640 </div> | 640 </div> |
| 641 | 641 |
| 642 <div class="bad"> | 642 <div class="bad"> |
| 643 {% prettify dart %} | 643 {% prettify dart %} |
| 644 const pi = 3.14; | 644 const PI = 3.14; |
| 645 const kDefaultTimeout = 1000; | 645 const kDefaultTimeout = 1000; |
| 646 final URL_SCHEME = new RegExp('^([a-z]+):'); | 646 final URL_SCHEME = new RegExp('^([a-z]+):'); |
| 647 | 647 |
| 648 class Dice { | 648 class Dice { |
| 649 static final NUMBER_GENERATOR = new Random(); | 649 static final NUMBER_GENERATOR = new Random(); |
| 650 } | 650 } |
| 651 {% endprettify %} | 651 {% endprettify %} |
| 652 </div> | 652 </div> |
| 653 | 653 |
| 654 <aside class="alert alert-info" markdown="1"> | 654 <aside class="alert alert-info" markdown="1"> |
| (...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1490 | 1490 |
| 1491 var fooList = [ | 1491 var fooList = [ |
| 1492 1, | 1492 1, |
| 1493 2, | 1493 2, |
| 1494 3]; | 1494 3]; |
| 1495 | 1495 |
| 1496 var fooList = [1, 2, | 1496 var fooList = [1, 2, |
| 1497 3, 4]; | 1497 3, 4]; |
| 1498 {% endprettify %} | 1498 {% endprettify %} |
| 1499 </div> | 1499 </div> |
| OLD | NEW |