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

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

Issue 1232313002: Use package:sky imports consistently (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: fix BUILD.gn Created 5 years, 5 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/theme/typography.dart ('k') | sky/sdk/lib/widgets/animated_container.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 '../animation/animation_performance.dart'; 5 import 'package:sky/animation/animation_performance.dart';
6 import 'basic.dart'; 6 import 'package:sky/widgets/basic.dart';
7 7
8 abstract class AnimatedComponent extends StatefulComponent { 8 abstract class AnimatedComponent extends StatefulComponent {
9 9
10 AnimatedComponent({ String key }) : super(key: key); 10 AnimatedComponent({ String key }) : super(key: key);
11 11
12 void syncFields(AnimatedComponent source) { } 12 void syncFields(AnimatedComponent source) { }
13 13
14 final List<AnimationPerformance> _watchedPerformances = new List<AnimationPerf ormance>(); 14 final List<AnimationPerformance> _watchedPerformances = new List<AnimationPerf ormance>();
15 15
16 void watchPerformance(AnimationPerformance performance) { 16 void watchPerformance(AnimationPerformance performance) {
17 assert(!_watchedPerformances.contains(performance)); 17 assert(!_watchedPerformances.contains(performance));
18 _watchedPerformances.add(performance); 18 _watchedPerformances.add(performance);
19 if (mounted) 19 if (mounted)
20 performance.addListener(scheduleBuild); 20 performance.addListener(scheduleBuild);
21 } 21 }
22 22
23 void didMount() { 23 void didMount() {
24 for (AnimationPerformance performance in _watchedPerformances) 24 for (AnimationPerformance performance in _watchedPerformances)
25 performance.addListener(scheduleBuild); 25 performance.addListener(scheduleBuild);
26 super.didMount(); 26 super.didMount();
27 } 27 }
28 28
29 void didUnmount() { 29 void didUnmount() {
30 for (AnimationPerformance performance in _watchedPerformances) 30 for (AnimationPerformance performance in _watchedPerformances)
31 performance.removeListener(scheduleBuild); 31 performance.removeListener(scheduleBuild);
32 super.didUnmount(); 32 super.didUnmount();
33 } 33 }
34 34
35 } 35 }
OLDNEW
« no previous file with comments | « sky/sdk/lib/theme/typography.dart ('k') | sky/sdk/lib/widgets/animated_container.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698