Permalink
Browse files

Instantiation of lists with new List<Object>

  • Loading branch information...
1 parent 49724ed commit c4065ce10191066b55bfd57a6599ab73a546e2e3 @MathieuLorber committed Oct 27, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 labs/architecture-examples/dart/web/dart/TodoApp.dart
@@ -1,7 +1,7 @@
part of todomvc;
class TodoApp {
- List<TodoWidget> todoWidgets = [];
+ List<TodoWidget> todoWidgets = new List<TodoWidget>();
Element todoListElement = query('#todo-list');
Element mainElement = query('#main');
@@ -63,7 +63,7 @@ class TodoApp {
});
clearCompletedElement.on.click.add((MouseEvent e) {
- List<TodoWidget> newList = [];
+ List<TodoWidget> newList = new List<TodoWidget>();
for (TodoWidget todoWidget in todoWidgets) {
if (todoWidget.todo.completed) {
todoWidget.element.remove();
@@ -170,7 +170,7 @@ class TodoApp {
void save() {
StringBuffer storage = new StringBuffer('[');
- List<Todo> todos = [];
+ List<Todo> todos = new List<Todo>();
for (TodoWidget todoWidget in todoWidgets) {
todos.add(todoWidget.todo);
}

0 comments on commit c4065ce

Please sign in to comment.