OLD | NEW |
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 '../theme/colors.dart'; | 6 import '../theme/colors.dart'; |
7 | 7 |
8 class DrawerHeader extends Component { | 8 class DrawerHeader extends Component { |
9 static final Style _style = new Style(''' | 9 static final Style _style = new Style(''' |
10 display: flex; | 10 display: flex; |
(...skipping 15 matching lines...) Expand all Loading... |
26 font-family: 'Roboto Medium', 'Helvetica'; | 26 font-family: 'Roboto Medium', 'Helvetica'; |
27 color: #212121;''' | 27 color: #212121;''' |
28 ); | 28 ); |
29 | 29 |
30 List<Node> children; | 30 List<Node> children; |
31 | 31 |
32 DrawerHeader({ Object key, this.children }) : super(key: key); | 32 DrawerHeader({ Object key, this.children }) : super(key: key); |
33 | 33 |
34 Node build() { | 34 Node build() { |
35 return new Container( | 35 return new Container( |
36 style: _style, | 36 styles: [_style], |
37 children: [ | 37 children: [ |
38 new Container( | 38 new Container( |
39 key: 'Spacer', | 39 key: 'Spacer', |
40 style: _spacerStyle | 40 styles: [_spacerStyle] |
41 ), | 41 ), |
42 new Container( | 42 new Container( |
43 key: 'Label', | 43 key: 'Label', |
44 style: _labelStyle, | 44 styles: [_labelStyle], |
45 children: children | 45 children: children |
46 ) | 46 ) |
47 ] | 47 ] |
48 ); | 48 ); |
49 } | 49 } |
50 } | 50 } |
OLD | NEW |