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

Side by Side Diff: sky/framework/components/scaffold.dart

Issue 1007893005: Clean up stock_app.dart (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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/framework/components/menu_item.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 '../fn.dart'; 5 import '../fn.dart';
6 import 'action_bar.dart'; 6 import 'action_bar.dart';
7 import 'drawer.dart'; 7 import 'drawer.dart';
8 import 'floating_action_button.dart'; 8 import 'floating_action_button.dart';
9 import 'package:sky/framework/theme/typography.dart' as typography; 9 import 'package:sky/framework/theme/typography.dart' as typography;
10 10
(...skipping 15 matching lines...) Expand all
26 bottom: 16px; 26 bottom: 16px;
27 right: 16px;'''); 27 right: 16px;''');
28 28
29 static final Style _drawerStyle = new Style(''' 29 static final Style _drawerStyle = new Style('''
30 position: absolute; 30 position: absolute;
31 top: 0; 31 top: 0;
32 left: 0; 32 left: 0;
33 bottom: 0; 33 bottom: 0;
34 right: 0;'''); 34 right: 0;''');
35 35
36 ActionBar actionBar; 36 Node header;
37 Node content; 37 Node content;
38 FloatingActionButton fab; 38 FloatingActionButton fab;
39 Drawer drawer; 39 Drawer drawer;
40 List<Node> overlays; 40 List<Node> overlays;
41 41
42 Scaffold({ 42 Scaffold({
43 Object key, 43 Object key,
44 this.actionBar, 44 this.header,
45 this.content, 45 this.content,
46 this.fab, 46 this.fab,
47 this.drawer, 47 this.drawer,
48 this.overlays 48 this.overlays
49 }) : super(key: key); 49 }) : super(key: key);
50 50
51 Node build() { 51 Node build() {
52 var children = [ 52 List<Node> children = [
53 new Container( 53 new Container(
54 key: 'Main', 54 key: 'Main',
55 style: _mainStyle, 55 style: _mainStyle,
56 children: [ 56 children: [header, new StyleNode(content, _contentStyle)])
57 actionBar,
58 new StyleNode(content, _contentStyle)
59 ]
60 ),
61 ]; 57 ];
62 58
63 if (fab != null) 59 if (fab != null)
64 children.add(new StyleNode(fab, _fabStyle)); 60 children.add(new StyleNode(fab, _fabStyle));
65 61
66 if (drawer != null) 62 if (drawer != null)
67 children.add(new StyleNode(drawer, _drawerStyle)); 63 children.add(new StyleNode(drawer, _drawerStyle));
68 64
69 if (overlays != null) 65 if (overlays != null)
70 children.addAll(overlays); 66 children.addAll(overlays);
71 67
72 return new Container(style: _style, children: children); 68 return new Container(style: _style, children: children);
73 } 69 }
74 } 70 }
OLDNEW
« no previous file with comments | « sky/framework/components/menu_item.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698