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

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

Issue 22950008: move fancy_syntax into Dart SVN (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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
Index: pkg/polymer_expressions/example/person.dart
diff --git a/pkg/polymer_expressions/example/person.dart b/pkg/polymer_expressions/example/person.dart
new file mode 100644
index 0000000000000000000000000000000000000000..d561fac4b0fa01b7d198ca1031c2e373f948c0ff
--- /dev/null
+++ b/pkg/polymer_expressions/example/person.dart
@@ -0,0 +1,46 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+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 _lastName;
+ List<String> _items;
+
+ Person(this._firstName, this._lastName, this._items);
+
+ String get firstName => _firstName;
+
+ void set firstName(String value) {
+ _firstName = value;
+ notifyChange(new PropertyChangeRecord(_FIRST_NAME));
+ }
+
+ String get lastName => _lastName;
+
+ void set lastName(String value) {
+ _lastName = value;
+ notifyChange(new PropertyChangeRecord(_LAST_NAME));
+ }
+
+ String getFullName() => '$_firstName $_lastName';
+
+ List<String> get items => _items;
+
+ void set items(List<String> value) {
+ _items = value;
+ notifyChange(new PropertyChangeRecord(_ITEMS));
+ }
+
+ String toString() => "Person(firstName: $_firstName, lastName: $_lastName)";
+
+}
« no previous file with comments | « pkg/polymer_expressions/example/example.html ('k') | pkg/polymer_expressions/example/streams/collect_key_press.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698