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

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

Issue 1234963002: Start an AddressBook example (to test text fields) (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
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/widgets/theme.dart'; 5 import 'package:sky/widgets/theme.dart';
6 6
7 import 'package:sky/painting/text_style.dart'; 7 import 'package:sky/painting/text_style.dart';
8 import 'package:sky/rendering/flex.dart'; 8 import 'package:sky/rendering/flex.dart';
9 import 'package:sky/theme/shadows.dart'; 9 import 'package:sky/theme/shadows.dart';
10 import 'package:sky/theme/typography.dart' as typography; 10 import 'package:sky/theme/typography.dart' as typography;
(...skipping 29 matching lines...) Expand all
40 iconThemeData = const IconThemeData(color: IconThemeColor.black); 40 iconThemeData = const IconThemeData(color: IconThemeColor.black);
41 } else { 41 } else {
42 iconThemeData = const IconThemeData(color: IconThemeColor.white); 42 iconThemeData = const IconThemeData(color: IconThemeColor.white);
43 } 43 }
44 } 44 }
45 45
46 List<Widget> children = new List<Widget>(); 46 List<Widget> children = new List<Widget>();
47 if (left != null) 47 if (left != null)
48 children.add(left); 48 children.add(left);
49 49
50 if (center != null) { 50 children.add(
51 children.add( 51 new Flexible(
52 new Flexible( 52 child: new Padding(
53 child: new Padding( 53 child: center,
54 child: center, 54 padding: new EdgeDims.only(left: 24.0)
55 padding: new EdgeDims.only(left: 24.0)
56 )
57 ) 55 )
58 ); 56 )
59 } 57 );
60 58
61 if (right != null) 59 if (right != null)
62 children.addAll(right); 60 children.addAll(right);
63 61
64 Widget content = new Container( 62 Widget content = new Container(
65 child: new DefaultTextStyle( 63 child: new DefaultTextStyle(
66 style: defaultTextStyle, 64 style: defaultTextStyle,
67 child: new Flex( 65 child: new Flex(
68 [new Container(child: new Flex(children), height: kToolBarHeight)], 66 [new Container(child: new Flex(children), height: kToolBarHeight)],
69 alignItems: FlexAlignItems.end 67 alignItems: FlexAlignItems.end
70 ) 68 )
71 ), 69 ),
72 padding: new EdgeDims.symmetric(horizontal: 8.0), 70 padding: new EdgeDims.symmetric(horizontal: 8.0),
73 decoration: new BoxDecoration( 71 decoration: new BoxDecoration(
74 backgroundColor: toolbarColor, 72 backgroundColor: toolbarColor,
75 boxShadow: shadows[2] 73 boxShadow: shadows[2]
76 ) 74 )
77 ); 75 );
78 76
79 if (iconThemeData != null) 77 if (iconThemeData != null)
80 content = new IconTheme(data: iconThemeData, child: content); 78 content = new IconTheme(data: iconThemeData, child: content);
81 return content; 79 return content;
82 } 80 }
83 81
84 } 82 }
OLDNEW
« sky/sdk/example/address_book/lib/main.dart ('K') | « sky/sdk/lib/theme/theme_data.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698