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

Side by Side Diff: sky/examples/widgets/spinning_mixed.dart

Issue 1194473004: Remove keys from the examples. (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/examples/widgets/sector.dart ('k') | no next file » | 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:sky' as sky; 5 import 'dart:sky' as sky;
6 6
7 import 'package:sky/app/scheduler.dart'; 7 import 'package:sky/app/scheduler.dart';
8 import 'package:sky/rendering/box.dart'; 8 import 'package:sky/rendering/box.dart';
9 import 'package:sky/rendering/flex.dart'; 9 import 'package:sky/rendering/flex.dart';
10 import 'package:sky/widgets/basic.dart'; 10 import 'package:sky/widgets/basic.dart';
(...skipping 19 matching lines...) Expand all
30 return new Flexible( 30 return new Flexible(
31 child: new Container( 31 child: new Container(
32 decoration: new BoxDecoration(backgroundColor: color) 32 decoration: new BoxDecoration(backgroundColor: color)
33 ) 33 )
34 ); 34 );
35 } 35 }
36 } 36 }
37 37
38 Widget builder() { 38 Widget builder() {
39 return new Flex([ 39 return new Flex([
40 new Rectangle(const Color(0xFF00FFFF), key: 'a'), 40 new Rectangle(const Color(0xFF00FFFF)),
41 new Container( 41 new Container(
42 padding: new EdgeDims.all(10.0), 42 padding: new EdgeDims.all(10.0),
43 margin: new EdgeDims.all(10.0), 43 margin: new EdgeDims.all(10.0),
44 decoration: new BoxDecoration(backgroundColor: const Color(0xFFCCCCCC)), 44 decoration: new BoxDecoration(backgroundColor: const Color(0xFFCCCCCC)),
45 child: new RaisedButton( 45 child: new RaisedButton(
46 child: new Flex([ 46 child: new Flex([
47 new Image(src: "https://www.dartlang.org/logos/dart-logo.png"), 47 new Image(src: "https://www.dartlang.org/logos/dart-logo.png"),
48 new Text('PRESS ME'), 48 new Text('PRESS ME'),
49 ]), 49 ]),
50 onPressed: () => print("Hello World") 50 onPressed: () => print("Hello World")
51 ) 51 )
52 ), 52 ),
53 new Rectangle(const Color(0xFFFFFF00), key: 'b'), 53 new Rectangle(const Color(0xFFFFFF00)),
54 ], 54 ],
55 direction: FlexDirection.vertical, 55 direction: FlexDirection.vertical,
56 justifyContent: FlexJustifyContent.spaceBetween 56 justifyContent: FlexJustifyContent.spaceBetween
57 ); 57 );
58 } 58 }
59 59
60 double timeBase; 60 double timeBase;
61 RenderTransform transformBox; 61 RenderTransform transformBox;
62 62
63 final TestRenderView tester = new TestRenderView(); 63 final TestRenderView tester = new TestRenderView();
(...skipping 26 matching lines...) Expand all
90 addFlexChildSolidColor(flexRoot, const sky.Color(0xFFFF00FF), flex: 1); 90 addFlexChildSolidColor(flexRoot, const sky.Color(0xFFFF00FF), flex: 1);
91 flexRoot.add(proxy); 91 flexRoot.add(proxy);
92 addFlexChildSolidColor(flexRoot, const sky.Color(0xFF0000FF), flex: 1); 92 addFlexChildSolidColor(flexRoot, const sky.Color(0xFF0000FF), flex: 1);
93 93
94 transformBox = new RenderTransform(child: flexRoot, transform: new Matrix4.ide ntity()); 94 transformBox = new RenderTransform(child: flexRoot, transform: new Matrix4.ide ntity());
95 RenderPadding root = new RenderPadding(padding: new EdgeDims.all(20.0), child: transformBox); 95 RenderPadding root = new RenderPadding(padding: new EdgeDims.all(20.0), child: transformBox);
96 96
97 WidgetAppView.appView.root = root; 97 WidgetAppView.appView.root = root;
98 addPersistentFrameCallback(rotate); 98 addPersistentFrameCallback(rotate);
99 } 99 }
OLDNEW
« no previous file with comments | « sky/examples/widgets/sector.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698