OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 import 'dart:async'; | 5 import 'dart:async'; |
6 | 6 |
7 import '../animation/animated_value.dart'; | 7 import '../framework/animation/animated_value.dart'; |
8 import 'basic.dart'; | 8 import 'basic.dart'; |
9 | 9 |
10 typedef void SetterFunction(double value); | 10 typedef void SetterFunction(double value); |
11 | 11 |
12 class _AnimationEntry { | 12 class _AnimationEntry { |
13 _AnimationEntry(this.value, this.setter); | 13 _AnimationEntry(this.value, this.setter); |
14 final AnimatedValue value; | 14 final AnimatedValue value; |
15 final SetterFunction setter; | 15 final SetterFunction setter; |
16 StreamSubscription<double> subscription; | 16 StreamSubscription<double> subscription; |
17 } | 17 } |
(...skipping 25 matching lines...) Expand all Loading... |
43 void didUnmount() { | 43 void didUnmount() { |
44 for (_AnimationEntry entry in _animatedFields) { | 44 for (_AnimationEntry entry in _animatedFields) { |
45 assert(entry.subscription != null); | 45 assert(entry.subscription != null); |
46 entry.subscription.cancel(); | 46 entry.subscription.cancel(); |
47 entry.subscription = null; | 47 entry.subscription = null; |
48 } | 48 } |
49 super.didUnmount(); | 49 super.didUnmount(); |
50 } | 50 } |
51 | 51 |
52 } | 52 } |
OLD | NEW |