Permalink
Browse files

Methods cascade

  • Loading branch information...
1 parent 78e15bd commit f93bf982a4231d663c09764a4aca5b478d7d634b @MathieuLorber committed Oct 24, 2012
Showing with 7 additions and 6 deletions.
  1. +7 −6 labs/architecture-examples/dart/dart/TodoElement.dart
@@ -58,12 +58,13 @@ class TodoElement {
todoApp.save();
}
- editElement.on.keyPress.add((KeyboardEvent e) {
- if(e.keyIdentifier == KeyName.ENTER) {
- doneEditing(e);
- }
- });
- editElement.on.blur.add(doneEditing);
+ editElement.on
+ ..keyPress.add((KeyboardEvent e) {
+ if(e.keyIdentifier == KeyName.ENTER) {
+ doneEditing(e);
+ }
+ })
+ ..blur.add(doneEditing);
return element;
}

0 comments on commit f93bf98

Please sign in to comment.