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

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

Issue 26734004: use symbol literals instead of const ctor in packages (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 | « pkg/polymer/lib/src/loader.dart ('k') | pkg/polymer_expressions/lib/polymer_expressions.dart » ('j') | no next file with comments »
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 d561fac4b0fa01b7d198ca1031c2e373f948c0ff..1c591b767290dc43858ac97bed6383d863659b30 100644
--- a/pkg/polymer_expressions/example/person.dart
+++ b/pkg/polymer_expressions/example/person.dart
@@ -7,12 +7,7 @@ library person;
import 'package:observe/observe.dart';
class Person extends ChangeNotifierBase {
- static const _FIRST_NAME = const Symbol('firstName');
- static const _LAST_NAME = const Symbol('lastName');
- static const _ITEMS = const Symbol('items');
- static const _GET_FULL_NAME = const Symbol('getFullName');
-
- String _firstName;
+\ String _firstName;
String _lastName;
List<String> _items;
@@ -22,14 +17,14 @@ class Person extends ChangeNotifierBase {
void set firstName(String value) {
_firstName = value;
- notifyChange(new PropertyChangeRecord(_FIRST_NAME));
+ notifyChange(new PropertyChangeRecord(#firstName));
}
String get lastName => _lastName;
void set lastName(String value) {
_lastName = value;
- notifyChange(new PropertyChangeRecord(_LAST_NAME));
+ notifyChange(new PropertyChangeRecord(#lastName));
}
String getFullName() => '$_firstName $_lastName';
@@ -38,7 +33,7 @@ class Person extends ChangeNotifierBase {
void set items(List<String> value) {
_items = value;
- notifyChange(new PropertyChangeRecord(_ITEMS));
+ notifyChange(new PropertyChangeRecord(#items));
}
String toString() => "Person(firstName: $_firstName, lastName: $_lastName)";
« no previous file with comments | « pkg/polymer/lib/src/loader.dart ('k') | pkg/polymer_expressions/lib/polymer_expressions.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698