| Index: pkg/observe/lib/src/metadata.dart
|
| diff --git a/pkg/observe/lib/src/metadata.dart b/pkg/observe/lib/src/metadata.dart
|
| index a1e4e155f8b74b5ee25f00995a45be907593c32c..16c6ccab4155501f62a2843a5720170c3d7f7d67 100644
|
| --- a/pkg/observe/lib/src/metadata.dart
|
| +++ b/pkg/observe/lib/src/metadata.dart
|
| @@ -4,51 +4,43 @@
|
|
|
| library observe.src.metadata;
|
|
|
| -/**
|
| - * Use `@observable` to make a field automatically observable, or to indicate
|
| - * that a property is observable.
|
| - */
|
| +/// Use `@observable` to make a field automatically observable, or to indicate
|
| +/// that a property is observable.
|
| const ObservableProperty observable = const ObservableProperty();
|
|
|
| -/**
|
| - * An annotation that is used to make a property observable.
|
| - * Normally this is used via the [observable] constant, for example:
|
| - *
|
| - * class Monster {
|
| - * @observable int health;
|
| - * }
|
| - *
|
| - * If needed, you can subclass this to create another annotation that will also
|
| - * be treated as observable.
|
| - */
|
| +/// An annotation that is used to make a property observable.
|
| +/// Normally this is used via the [observable] constant, for example:
|
| +///
|
| +/// class Monster {
|
| +/// @observable int health;
|
| +/// }
|
| +///
|
| +/// If needed, you can subclass this to create another annotation that will also
|
| +/// be treated as observable.
|
| // Note: observable properties imply reflectable.
|
| class ObservableProperty {
|
| const ObservableProperty();
|
| }
|
|
|
|
|
| -/**
|
| - * Use `@reflectable` to make a type or member available to reflection in the
|
| - * observe package. This is necessary to make the member visible to
|
| - * [PathObserver], or similar systems, once the code is deployed.
|
| - */
|
| +/// Use `@reflectable` to make a type or member available to reflection in the
|
| +/// observe package. This is necessary to make the member visible to
|
| +/// [PathObserver], or similar systems, once the code is deployed.
|
| const Reflectable reflectable = const Reflectable();
|
|
|
| -/**
|
| - * An annotation that is used to make a type or member reflectable. This makes
|
| - * it available to [PathObserver] at runtime. For example:
|
| - *
|
| - * @reflectable
|
| - * class Monster extends ChangeNotifier {
|
| - * int _health;
|
| - * int get health => _health;
|
| - * ...
|
| - * }
|
| - * ...
|
| - * // This will work even if the code has been tree-shaken/minified:
|
| - * final monster = new Monster();
|
| - * new PathObserver(monster, 'health').changes.listen(...);
|
| - */
|
| +/// An annotation that is used to make a type or member reflectable. This makes
|
| +/// it available to [PathObserver] at runtime. For example:
|
| +///
|
| +/// @reflectable
|
| +/// class Monster extends ChangeNotifier {
|
| +/// int _health;
|
| +/// int get health => _health;
|
| +/// ...
|
| +/// }
|
| +/// ...
|
| +/// // This will work even if the code has been tree-shaken/minified:
|
| +/// final monster = new Monster();
|
| +/// new PathObserver(monster, 'health').changes.listen(...);
|
| class Reflectable {
|
| const Reflectable();
|
| }
|
|
|