Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(172)

Unified Diff: pkg/polymer_expressions/example/person.dart

Issue 26318004: fix dart2js warnings in polymer_expressions pkg (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/polymer_expressions/lib/eval.dart » ('j') | pkg/polymer_expressions/lib/filter.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/polymer_expressions/example/person.dart
diff --git a/pkg/polymer_expressions/example/person.dart b/pkg/polymer_expressions/example/person.dart
index 1c591b767290dc43858ac97bed6383d863659b30..c77f5b86da8453e8232d1f707f0699d3ee5dcc38 100644
--- a/pkg/polymer_expressions/example/person.dart
+++ b/pkg/polymer_expressions/example/person.dart
@@ -7,7 +7,7 @@ library person;
import 'package:observe/observe.dart';
class Person extends ChangeNotifierBase {
-\ String _firstName;
+ String _firstName;
String _lastName;
List<String> _items;
@@ -16,15 +16,13 @@ class Person extends ChangeNotifierBase {
String get firstName => _firstName;
void set firstName(String value) {
- _firstName = value;
- notifyChange(new PropertyChangeRecord(#firstName));
+ _firstName = notifyPropertyChange(#firstName, _firstName, value);
}
String get lastName => _lastName;
void set lastName(String value) {
- _lastName = value;
- notifyChange(new PropertyChangeRecord(#lastName));
+ _lastName = notifyPropertyChange(#lastName, _lastName, value);
}
String getFullName() => '$_firstName $_lastName';
@@ -32,10 +30,8 @@ class Person extends ChangeNotifierBase {
List<String> get items => _items;
void set items(List<String> value) {
- _items = value;
- notifyChange(new PropertyChangeRecord(#items));
+ _items = notifyPropertyChange(#items, _items, value);
}
String toString() => "Person(firstName: $_firstName, lastName: $_lastName)";
-
}
« no previous file with comments | « no previous file | pkg/polymer_expressions/lib/eval.dart » ('j') | pkg/polymer_expressions/lib/filter.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698