| OLD | NEW |
| 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 library observe.src.metadata; |
| 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 */ |
| 11 const ObservableProperty observable = const ObservableProperty(); | 11 const ObservableProperty observable = const ObservableProperty(); |
| 12 | 12 |
| 13 /** | 13 /** |
| 14 * An annotation that is used to make a property observable. | 14 * An annotation that is used to make a property observable. |
| 15 * Normally this is used via the [observable] constant, for example: | 15 * Normally this is used via the [observable] constant, for example: |
| (...skipping 29 matching lines...) Expand all Loading... |
| 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 } |
| OLD | NEW |