| OLD | NEW |
| 1 library todo; | 1 library todo; |
| 2 | 2 |
| 3 import 'package:angular/angular.dart'; | 3 import 'package:angular/angular.dart'; |
| 4 | 4 |
| 5 |
| 5 class Item { | 6 class Item { |
| 6 String text; | 7 String text; |
| 7 bool done; | 8 bool done; |
| 8 | 9 |
| 9 Item([String this.text = '', bool this.done = false]); | 10 Item([String this.text = '', bool this.done = false]); |
| 10 | 11 |
| 11 bool get isEmpty => text.isEmpty; | 12 bool get isEmpty => text.isEmpty; |
| 12 | 13 |
| 13 clone() => new Item(text, done); | 14 clone() => new Item(text, done); |
| 14 | 15 |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 } | 85 } |
| 85 | 86 |
| 86 String classFor(Item item) { | 87 String classFor(Item item) { |
| 87 return item.done ? 'done' : ''; | 88 return item.done ? 'done' : ''; |
| 88 } | 89 } |
| 89 | 90 |
| 90 int remaining() { | 91 int remaining() { |
| 91 return items.where((item) => !item.done).length; | 92 return items.where((item) => !item.done).length; |
| 92 } | 93 } |
| 93 } | 94 } |
| OLD | NEW |