| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 import '../fn.dart'; | |
| 6 import '../layout.dart'; | |
| 7 import '../theme/colors.dart'; | |
| 8 import '../theme/view_configuration.dart'; | |
| 9 | |
| 10 class DrawerHeader extends Component { | |
| 11 static final Style _style = new Style(''' | |
| 12 height: ${140 + kStatusBarHeight}px; | |
| 13 background-color: ${BlueGrey[50]}; | |
| 14 border-bottom: 1px solid #D1D9E1; | |
| 15 padding-bottom: 7px; | |
| 16 margin-bottom: 8px;''' | |
| 17 ); | |
| 18 | |
| 19 static final FlexBoxParentData _spacerParentData = new FlexBoxParentData()..fl
ex = 1; | |
| 20 | |
| 21 static final Style _labelStyle = new Style(''' | |
| 22 padding: 0 16px;''' | |
| 23 ); | |
| 24 | |
| 25 List<UINode> children; | |
| 26 | |
| 27 DrawerHeader({ Object key, this.children }) : super(key: key); | |
| 28 | |
| 29 UINode build() { | |
| 30 return new FlexContainer( | |
| 31 direction: FlexDirection.Column, | |
| 32 style: _style, | |
| 33 children: [ | |
| 34 new ParentDataNode( | |
| 35 new Container(key: 'Spacer'), | |
| 36 _spacerParentData | |
| 37 ), | |
| 38 new Container( | |
| 39 key: 'Label', | |
| 40 style: _labelStyle, | |
| 41 children: children | |
| 42 ) | |
| 43 ] | |
| 44 ); | |
| 45 } | |
| 46 } | |
| OLD | NEW |