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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
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 ChangeNotifierBase {
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 = value; 19 _firstName = notifyPropertyChange(#firstName, _firstName, value);
20 notifyChange(new PropertyChangeRecord(#firstName));
21 } 20 }
22 21
23 String get lastName => _lastName; 22 String get lastName => _lastName;
24 23
25 void set lastName(String value) { 24 void set lastName(String value) {
26 _lastName = value; 25 _lastName = notifyPropertyChange(#lastName, _lastName, value);
27 notifyChange(new PropertyChangeRecord(#lastName));
28 } 26 }
29 27
30 String getFullName() => '$_firstName $_lastName'; 28 String getFullName() => '$_firstName $_lastName';
31 29
32 List<String> get items => _items; 30 List<String> get items => _items;
33 31
34 void set items(List<String> value) { 32 void set items(List<String> value) {
35 _items = value; 33 _items = notifyPropertyChange(#items, _items, value);
36 notifyChange(new PropertyChangeRecord(#items));
37 } 34 }
38 35
39 String toString() => "Person(firstName: $_firstName, lastName: $_lastName)"; 36 String toString() => "Person(firstName: $_firstName, lastName: $_lastName)";
40
41 } 37 }
OLDNEW
« 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