| Index: sky/framework/animation/animated_value.dart
|
| diff --git a/sky/framework/animation/animated_value.dart b/sky/framework/animation/animated_value.dart
|
| index faf17b6a82b901a7bc9e3d45253a3cfa0cf36cf6..0db6f90da0302976452fb51998199bffef52f332 100644
|
| --- a/sky/framework/animation/animated_value.dart
|
| +++ b/sky/framework/animation/animated_value.dart
|
| @@ -13,9 +13,12 @@ class AnimatedValue {
|
| double _value;
|
|
|
| AnimatedValue(double initial) {
|
| - value = initial;
|
| + _value = initial;
|
| }
|
|
|
| + // A stream of change in value from |initial|. The stream does not
|
| + // contain the initial value. Consumers should check the initial value via
|
| + // the |value| accessor.
|
| Stream<double> get onValueChanged => _controller.stream;
|
|
|
| double get value => _value;
|
| @@ -55,28 +58,3 @@ class AnimatedValue {
|
| });
|
| }
|
| }
|
| -
|
| -class AnimatedValueListener {
|
| - final Component _component;
|
| - final AnimatedValue _value;
|
| - StreamSubscription<double> _subscription;
|
| -
|
| - AnimatedValueListener(this._component, this._value);
|
| -
|
| - double get value => _value == null ? null : _value.value;
|
| -
|
| - void ensureListening() {
|
| - if (_subscription != null || _value == null)
|
| - return;
|
| - _subscription = _value.onValueChanged.listen((_) {
|
| - _component.scheduleBuild();
|
| - });
|
| - }
|
| -
|
| - void stopListening() {
|
| - if (_subscription == null)
|
| - return;
|
| - _subscription.cancel();
|
| - _subscription = null;
|
| - }
|
| -}
|
|
|