| 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 'button_base.dart'; | 6 import 'button_base.dart'; |
| 7 import 'icon.dart'; | 7 import 'icon.dart'; |
| 8 import 'ink_well.dart'; | 8 import 'ink_well.dart'; |
| 9 | 9 |
| 10 class MenuItem extends ButtonBase { | 10 class MenuItem extends ButtonBase { |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 | 37 |
| 38 MenuItem({ Object key, this.icon, this.children, this.onGestureTap }) : super(
key: key); | 38 MenuItem({ Object key, this.icon, this.children, this.onGestureTap }) : super(
key: key); |
| 39 | 39 |
| 40 UINode buildContent() { | 40 UINode buildContent() { |
| 41 return new EventListenerNode( | 41 return new EventListenerNode( |
| 42 new StyleNode( | 42 new StyleNode( |
| 43 new InkWell( | 43 new InkWell( |
| 44 children: [ | 44 children: [ |
| 45 new StyleNode( | 45 new StyleNode( |
| 46 new Icon( | 46 new Icon( |
| 47 size: 24.0, | 47 size: 24, |
| 48 type: "${icon}_grey600" | 48 type: "${icon}_grey600" |
| 49 ), | 49 ), |
| 50 _iconStyle | 50 _iconStyle |
| 51 ), | 51 ), |
| 52 new ParentDataNode( | 52 new ParentDataNode( |
| 53 new FlexContainer( | 53 new FlexContainer( |
| 54 direction: FlexDirection.Row, | 54 direction: FlexDirection.Row, |
| 55 style: _labelStyle, | 55 style: _labelStyle, |
| 56 children: children | 56 children: children |
| 57 ), | 57 ), |
| 58 _labelFlex | 58 _labelFlex |
| 59 ) | 59 ) |
| 60 ] | 60 ] |
| 61 ), | 61 ), |
| 62 highlight ? _highlightStyle : _style | 62 highlight ? _highlightStyle : _style |
| 63 ), | 63 ), |
| 64 onGestureTap: onGestureTap | 64 onGestureTap: onGestureTap |
| 65 ); | 65 ); |
| 66 } | 66 } |
| 67 } | 67 } |
| OLD | NEW |