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