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

Side by Side Diff: pkg/observe/lib/src/metadata.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/observe/lib/src/list_path_observer.dart ('k') | pkg/observe/lib/src/observable.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 part of observe; 5 part of observe;
6 6
7 /** 7 /**
8 * Use `@observable` to make a field automatically observable, or to indicate 8 * Use `@observable` to make a field automatically observable, or to indicate
9 * that a property is observable. 9 * that a property is observable.
10 */ 10 */
(...skipping 21 matching lines...) Expand all
32 * observe package. This is necessary to make the member visible to 32 * observe package. This is necessary to make the member visible to
33 * [PathObserver], or similar systems, once the code is deployed. 33 * [PathObserver], or similar systems, once the code is deployed.
34 */ 34 */
35 const Reflectable reflectable = const Reflectable(); 35 const Reflectable reflectable = const Reflectable();
36 36
37 /** 37 /**
38 * An annotation that is used to make a type or member reflectable. This makes 38 * An annotation that is used to make a type or member reflectable. This makes
39 * it available to [PathObserver] at runtime. For example: 39 * it available to [PathObserver] at runtime. For example:
40 * 40 *
41 * @reflectable 41 * @reflectable
42 * class Monster extends ChangeNotifierBase { 42 * class Monster extends ChangeNotifier {
43 * int _health; 43 * int _health;
44 * int get health => _health; 44 * int get health => _health;
45 * ... 45 * ...
46 * } 46 * }
47 * ... 47 * ...
48 * // This will work even if the code has been tree-shaken/minified: 48 * // This will work even if the code has been tree-shaken/minified:
49 * final monster = new Monster(); 49 * final monster = new Monster();
50 * new PathObserver(monster, 'health').changes.listen(...); 50 * new PathObserver(monster, 'health').changes.listen(...);
51 */ 51 */
52 class Reflectable { 52 class Reflectable {
53 const Reflectable(); 53 const Reflectable();
54 } 54 }
OLDNEW
« no previous file with comments | « pkg/observe/lib/src/list_path_observer.dart ('k') | pkg/observe/lib/src/observable.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698