Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Side by Side Diff: sky/sdk/lib/framework/widgets/animated_component.dart

Issue 1177243002: Refactor fn2.dart, since it breached our 1000-line threshold. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sky/sdk/lib/framework/scheduler.dart ('k') | sky/sdk/lib/framework/widgets/button.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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';
6
5 import '../animation/animated_value.dart'; 7 import '../animation/animated_value.dart';
6 import '../fn2.dart'; 8 import 'wrappers.dart';
7 import 'dart:async';
8 9
9 typedef void SetterFunction(double value); 10 typedef void SetterFunction(double value);
10 11
11 class _AnimationEntry { 12 class _AnimationEntry {
12 _AnimationEntry(this.value, this.setter); 13 _AnimationEntry(this.value, this.setter);
13 final AnimatedValue value; 14 final AnimatedValue value;
14 final SetterFunction setter; 15 final SetterFunction setter;
15 StreamSubscription<double> subscription; 16 StreamSubscription<double> subscription;
16 } 17 }
17 18
(...skipping 24 matching lines...) Expand all
42 void didUnmount() { 43 void didUnmount() {
43 for (_AnimationEntry entry in _animatedFields) { 44 for (_AnimationEntry entry in _animatedFields) {
44 assert(entry.subscription != null); 45 assert(entry.subscription != null);
45 entry.subscription.cancel(); 46 entry.subscription.cancel();
46 entry.subscription = null; 47 entry.subscription = null;
47 } 48 }
48 super.didUnmount(); 49 super.didUnmount();
49 } 50 }
50 51
51 } 52 }
OLDNEW
« no previous file with comments | « sky/sdk/lib/framework/scheduler.dart ('k') | sky/sdk/lib/framework/widgets/button.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698