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

Side by Side Diff: sky/sdk/example/stocks/lib/stock_home.dart

Issue 1231103005: Rename watchPerformance to watch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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 | « no previous file | sky/sdk/lib/widgets/animated_component.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 'package:sky/editing/input.dart'; 5 import 'package:sky/editing/input.dart';
6 import 'package:sky/animation/animation_performance.dart'; 6 import 'package:sky/animation/animation_performance.dart';
7 import 'package:sky/widgets/animated_component.dart'; 7 import 'package:sky/widgets/animated_component.dart';
8 import 'package:sky/widgets/animation_builder.dart'; 8 import 'package:sky/widgets/animation_builder.dart';
9 import 'package:sky/theme/colors.dart' as colors; 9 import 'package:sky/theme/colors.dart' as colors;
10 import 'package:sky/widgets/basic.dart'; 10 import 'package:sky/widgets/basic.dart';
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 actions: [new SnackBarAction(label: "UNDO", onPressed: _handleUndo)] 279 actions: [new SnackBarAction(label: "UNDO", onPressed: _handleUndo)]
280 )); 280 ));
281 } 281 }
282 282
283 void _handleStockPurchased() { 283 void _handleStockPurchased() {
284 setState(() { 284 setState(() {
285 _snackbarTransform = new AnimationBuilder() 285 _snackbarTransform = new AnimationBuilder()
286 ..position = new AnimatedType<Point>(const Point(0.0, 45.0), end: Point. origin); 286 ..position = new AnimatedType<Point>(const Point(0.0, 45.0), end: Point. origin);
287 var performance = _snackbarTransform.createPerformance( 287 var performance = _snackbarTransform.createPerformance(
288 [_snackbarTransform.position], duration: _kSnackbarSlideDuration); 288 [_snackbarTransform.position], duration: _kSnackbarSlideDuration);
289 watchPerformance(performance); 289 watch(performance);
290 performance.play(); 290 performance.play();
291 }); 291 });
292 } 292 }
293 293
294 Widget buildFloatingActionButton() { 294 Widget buildFloatingActionButton() {
295 var widget = new FloatingActionButton( 295 var widget = new FloatingActionButton(
296 child: new Icon(type: 'content/add', size: 24), 296 child: new Icon(type: 'content/add', size: 24),
297 backgroundColor: colors.RedAccent[200], 297 backgroundColor: colors.RedAccent[200],
298 onPressed: _handleStockPurchased 298 onPressed: _handleStockPurchased
299 ); 299 );
(...skipping 21 matching lines...) Expand all
321 body: buildTabNavigator(), 321 body: buildTabNavigator(),
322 snackBar: buildSnackBar(), 322 snackBar: buildSnackBar(),
323 floatingActionButton: buildFloatingActionButton(), 323 floatingActionButton: buildFloatingActionButton(),
324 drawer: _drawerShowing ? buildDrawer() : null 324 drawer: _drawerShowing ? buildDrawer() : null
325 ), 325 ),
326 ]; 326 ];
327 addMenuToOverlays(overlays); 327 addMenuToOverlays(overlays);
328 return new Stack(overlays); 328 return new Stack(overlays);
329 } 329 }
330 } 330 }
OLDNEW
« no previous file with comments | « no previous file | sky/sdk/lib/widgets/animated_component.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698