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

Side by Side Diff: sky/sdk/lib/framework/components2/drawer_header.dart

Issue 1174023003: Remove one more use of mirrors: Components now have to explicitly sync their fields. (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
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 '../fn2.dart'; 5 import '../fn2.dart';
6 import '../theme2/colors.dart'; 6 import '../theme2/colors.dart';
7 import '../theme2/view_configuration.dart'; 7 import '../theme2/view_configuration.dart';
8 8
9 class DrawerHeader extends Component { 9 class DrawerHeader extends Component {
10 10
11 DrawerHeader({ Object key, this.children }) : super(key: key); 11 DrawerHeader({ Object key, this.children }) : super(key: key);
12 12
13 List<UINode> children; 13 List<UINode> children;
14 14
15 void syncFields(DrawerHeader source) {
16 children = source.children;
17 super.syncFields(source);
18 }
19
15 UINode build() { 20 UINode build() {
16 return new Container( 21 return new Container(
17 key: 'drawer-header-outside', 22 key: 'drawer-header-outside',
18 height: kStatusBarHeight + kMaterialDrawerHeight, 23 height: kStatusBarHeight + kMaterialDrawerHeight,
19 decoration: new BoxDecoration( 24 decoration: new BoxDecoration(
20 backgroundColor: BlueGrey[50], 25 backgroundColor: BlueGrey[50],
21 border: const Border( 26 border: const Border(
22 bottom: const BorderSide( 27 bottom: const BorderSide(
23 color: const Color(0xFFD1D9E1), 28 color: const Color(0xFFD1D9E1),
24 width: 1.0 29 width: 1.0
(...skipping 14 matching lines...) Expand all
39 direction: FlexDirection.horizontal, 44 direction: FlexDirection.horizontal,
40 children: children 45 children: children
41 ) 46 )
42 ) 47 )
43 ] 48 ]
44 ) 49 )
45 ); 50 );
46 } 51 }
47 52
48 } 53 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698