Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Instantiation of lists with []

  • Loading branch information...
commit 2af54c0a77fd33ea6993b732da6f167f71418166 1 parent c199448
@MathieuLorber authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 labs/architecture-examples/dart/dart/TodoApp.dart
View
6 labs/architecture-examples/dart/dart/TodoApp.dart
@@ -1,7 +1,7 @@
part of todomvc;
class TodoApp {
- List<TodoElement> todoElements = new List();
+ List<TodoElement> todoElements = [];
Element todoListElement = query('#todo-list');
Element mainElement = query('#main');
@@ -63,7 +63,7 @@ class TodoApp {
});
clearCompletedElement.on.click.add((MouseEvent e) {
- List<TodoElement> newList = new List<TodoElement>();
+ List<TodoElement> newList = [];
for(TodoElement todoElement in todoElements) {
if(todoElement.todo.completed) {
todoElement.element.remove();
@@ -170,7 +170,7 @@ class TodoApp {
void save() {
StringBuffer storage = new StringBuffer('[');
- List<Todo> todos = new List<Todo>();
+ List<Todo> todos = [];
for(TodoElement todoElement in todoElements) {
todos.add(todoElement.todo);
}
Please sign in to comment.
Something went wrong with that request. Please try again.