Chromium Code Reviews| 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..f8ae3526554dc33ca1f71d1bd52004bd56315ea7 100644 |
| --- a/sky/framework/animation/animated_value.dart |
| +++ b/sky/framework/animation/animated_value.dart |
| @@ -13,7 +13,7 @@ class AnimatedValue { |
| double _value; |
| AnimatedValue(double initial) { |
| - value = initial; |
| + _value = initial; |
|
rafaelw
2015/03/20 05:36:00
Note: this prevents the initial value from being b
abarth-chromium
2015/03/20 05:41:49
Maybe add a comment explaining this subtle point?
rafaelw
2015/03/20 05:52:31
Done.
|
| } |
| Stream<double> get onValueChanged => _controller.stream; |
| @@ -55,28 +55,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; |
| - } |
| -} |