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

Side by Side Diff: pkg/polymer_expressions/example/person.dart

Issue 27618002: package:observe fix various api issues (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/polymer/test/build/all_phases_test.dart ('k') | pkg/polymer_expressions/lib/eval.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library person; 5 library person;
6 6
7 import 'package:observe/observe.dart'; 7 import 'package:observe/observe.dart';
8 8
9 class Person extends ChangeNotifierBase { 9 class Person extends ChangeNotifier {
10 String _firstName; 10 String _firstName;
11 String _lastName; 11 String _lastName;
12 List<String> _items; 12 List<String> _items;
13 13
14 Person(this._firstName, this._lastName, this._items); 14 Person(this._firstName, this._lastName, this._items);
15 15
16 String get firstName => _firstName; 16 String get firstName => _firstName;
17 17
18 void set firstName(String value) { 18 void set firstName(String value) {
19 _firstName = notifyPropertyChange(#firstName, _firstName, value); 19 _firstName = notifyPropertyChange(#firstName, _firstName, value);
20 } 20 }
21 21
22 String get lastName => _lastName; 22 String get lastName => _lastName;
23 23
24 void set lastName(String value) { 24 void set lastName(String value) {
25 _lastName = notifyPropertyChange(#lastName, _lastName, value); 25 _lastName = notifyPropertyChange(#lastName, _lastName, value);
26 } 26 }
27 27
28 String getFullName() => '$_firstName $_lastName'; 28 String getFullName() => '$_firstName $_lastName';
29 29
30 List<String> get items => _items; 30 List<String> get items => _items;
31 31
32 void set items(List<String> value) { 32 void set items(List<String> value) {
33 _items = notifyPropertyChange(#items, _items, value); 33 _items = notifyPropertyChange(#items, _items, value);
34 } 34 }
35 35
36 String toString() => "Person(firstName: $_firstName, lastName: $_lastName)"; 36 String toString() => "Person(firstName: $_firstName, lastName: $_lastName)";
37 } 37 }
OLDNEW
« no previous file with comments | « pkg/polymer/test/build/all_phases_test.dart ('k') | pkg/polymer_expressions/lib/eval.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698